def load_exception(package):
 try:
  return pickle.loads(package)
 except pickle.PicklingError as ex:
  return NestedException(('failed to unpickle remote exception -- %r' % (ex,)))

def load_exception ( package ) : try : return pickle . loads ( package ) except pickle . PicklingError as ex : return NestedException ( ( 'failed to unpickle remote exception -- %r' % ( ex , ) ) )
returns an exception object .