code: def makePickle(self, record):
          
          gelf_dict = self._make_gelf_dict(record)
          packed = self._pack_gelf_dict(gelf_dict)
          pickle = zlib.compress(packed) if self.compress else packed
          return pickle
docs: Convert a :class:`logging.LogRecord` into a bytes object
          representing a GELF log
  
          :param record: :class:`logging.LogRecord` to convert into a
              Graylog GELF log.
          :type record: logging.LogRecord
  
          :return: A bytes object representing a GELF log.
          :rtype: bytes