code: def loads(astring):
          
          try:
              return pickle.loads(zlib.decompress(astring))
          except zlib.error as e:
              raise SerializerError(
                  'Cannot decompress object ("{}")'.format(str(e))
              )
          except pickle.UnpicklingError as e:
              raise SerializerError(
                  'Cannot restore object ("{}")'.format(str(e))
              )
docs: Decompress and deserialize string into Python object via pickle.