code: def __create_header(self, command, command_string, session_id, reply_id):
          
          buf = pack('<4H', command, 0, session_id, reply_id) + command_string
          buf = unpack('8B' + '%sB' % len(command_string), buf)
          checksum = unpack('H', self.__create_checksum(buf))[0]
          reply_id += 1
          if reply_id >= const.USHRT_MAX:
              reply_id -= const.USHRT_MAX
  
          buf = pack('<4H', command, checksum, session_id, reply_id)
          return buf + command_string
docs: Puts a the parts that make up a packet together and packs them into a byte string