code: def load_exception(data_transferer, json_obj):
      json_obj = data_transferer.load(json_obj)
      if json_obj.get(FIELD_EXC_SI) is not None:
          return StopIteration
  
      exception_module = json_obj.get(FIELD_EXC_MODULE)
      exception_name = json_obj.get(FIELD_EXC_NAME)
      exception_class = None
      if exception_module not in sys.modules:
          # Try to import the module
          try:
              # Use __import__ so that the user can access this exception
              __import__(exception_module, None, None, "*")
          except Exception:
              pass
      # Try again (will succeed if the __import__ worked)
      if exception_module in sys.modules:
          exception_class = getattr(
              sys.modules[exception_module], exception_name, None
          )
      if exception_class is None or issubclass(exception_class, Stub):
          # Best effort to "recreate" an exception. Note that in some cases, exceptions
          # may actually be both exceptions we can transfer as well as classes we
          # can transfer (stubs) but for exceptions, we don't want to use the stub
          # otherwise it will just ping pong.
          name = "%s.%s" % (exception_module, exception_name)
          exception_class = _remote_exceptions_class.setdefault(
              name,
              type(
                  name,
                  (RemoteInterpreterException,),
                  {
                      "__module__": "%s/%s"
                      % (__name__, exception_module)
                  },
              ),
          )
      exception_class = _wrap_exception(exception_class)
      raised_exception = exception_class.__new__(exception_class)
      raised_exception.args = json_obj.get(FIELD_EXC_ARGS)
      for name, attr in json_obj.get(FIELD_EXC_ATTR):
          try:
              if name in raised_exception.__user_defined__:
                  setattr(raised_exception, "_original_%s" % name, attr)
              else:
                  setattr(raised_exception, name, attr)
          except AttributeError:
              # In case some things are read only
              pass
      s = json_obj.get(FIELD_EXC_STR)
      if s:
          try:
              if "__str__" in raised_exception.__user_defined__:
                  setattr(raised_exception, "_original___str__", s)
              else:
                  setattr(raised_exception, "__str__", lambda x, s=s: s)
          except AttributeError:
              raised_exception._missing_str = True
      s = json_obj.get(FIELD_EXC_REPR)
      if s:
          try:
              if "__repr__" in raised_exception.__user_defined__:
                  setattr(raised_exception, "_original___repr__", s)
              else:
                  setattr(
                      raised_exception, "__repr__", lambda x, s=s: s
                  )
          except AttributeError:
              raised_exception._missing_repr = True
      user_args = json_obj.get(FIELD_EXC_USER)
      if user_args is not None:
          try:
              deserializer = getattr(
                  raised_exception, "_deserialize_user"
              )
          except AttributeError:
              raised_exception._missing_deserializer = True
          else:
              deserializer(user_args)
      raised_exception._remote_tb = json_obj[FIELD_EXC_TB]
      return raised_exception
  
imports: import sys
  import traceback
label_desc: Use image node_id 2 for calling a global function with example usage: load_exception(data_transferer, json_obj) and returns: raised_exception, StopIteration