code: def encode(self, obj):
          
          if self._is_valid_mysql_bigint(obj):
              return obj, 'i'
  
          value = pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
          value_type = 'p'
          if (
              self._compress_min_length
              and len(value) >= self._compress_min_length
          ):
              value = zlib.compress(value, self._compress_level)
              value_type = 'z'
          return value, value_type
docs: Take a Python object and return it as a tuple (value, value_type), a
          blob and a one-char code for what type it is