code: def crc16(data):
      
      m_crc = 0xffff
      for this in data:
          m_crc ^= ord_byte(this)
          for _ in range(8):
              j = m_crc & 1
              m_crc >>= 1
              if j:
                  m_crc ^= 0x8408
      return m_crc
docs: Calculate an ISO13239 CRC checksum of the input buffer (bytestring).