code: def unpickle(pickled_string):
      
      try:
          obj = loads(pickled_string)
      except Exception as e:
          raise UnpickleError('Could not unpickle', pickled_string, e)
      return obj
docs: Unpickles a string, but raises a unified UnpickleError in case anything
      fails.
      This is a helper method to not have to deal with the fact that `loads()`
      potentially raises many types of exceptions (e.g. AttributeError,
      IndexError, TypeError, KeyError, etc.)