def _write(self, f):
        if len(self._records) > 0:
            for record in self._records:
                record._message_begin = record._message_end = False
            self._records[0]._message_begin = True
            self._records[-1]._message_end = True
            for record in self._records:
                record._write(f)
dataset/ETHPy150Open javgh/greenaddress-pos-tools/nfc/ndef/message.py/Message._write/original