class_docstr: Wrapper that handles the serialization of exception tracebacks.
  
  If an exception is triggered when calling the inner function, a copy of
  the full traceback is captured to make it possible to serialize
  it so that it can be rendered in a different Python process.
class_docstr_tok: ["Wrapper","that","handles","the","serialization","of","exception","tracebacks",".","If","an","exception","is","triggered","when","calling","the","inner","function",",","a","copy","of","the","full","traceback","is","captured","to","make","it","possible","to","serialize","it","so","that","it","can","be","rendered","in","a","different","Python","process","."]
code: def __call__(self, *args, **kwargs):
      try:
          return self.func(*args, **kwargs)
      except KeyboardInterrupt:
          # We capture the KeyboardInterrupt and reraise it as
          # something different, as multiprocessing does not
          # interrupt processing for a KeyboardInterrupt
          raise WorkerInterrupt()
      except:
          e_type, e_value, e_tb = sys.exc_info()
          text = format_exc(
              e_type, e_value, e_tb, context=10, tb_offset=1
          )
          raise TransportableException(text, e_type)
  
imports: import gc
  import os
  import sys
  import warnings
  import threading
  from abc import ABCMeta, abstractmethod
  from .format_stack import format_exc
  from .my_exceptions import WorkerInterrupt, TransportableException
  from ._multiprocessing_helpers import mp
  from ._compat import with_metaclass
label_desc: Use image node_id 2 for calling the SafeFunction obj's underlying member method code with example usage: obj.__call__() and returns: self