code: def encode(self, object_):
          
          if self.enforce_reversible:
              self.enforce_reversible = False
              if self.decode(self.encode(object_)) != object_:
                  raise ValueError('Encoding is not reversible for "%s"' % object_)
              self.enforce_reversible = True
  
          return object_
docs: Encodes an object.
  
          Args:
              object_ (object): Object to encode.
  
          Returns:
              object: Encoding of the object.