code: def __write_record(self, record_type, data):
      
      length = len(data)
  
      crc = crc32c.crc_update(crc32c.CRC_INIT, [record_type])
      crc = crc32c.crc_update(crc, data)
      crc = crc32c.crc_finalize(crc)
  
      self.__writer.write(
          struct.pack(_HEADER_FORMAT, _mask_crc(crc), length, record_type))
      self.__writer.write(data)
      self.__position += _HEADER_LENGTH + length
docs: Write single physical record.