code: def can(obj):
      """prepare an object for pickling"""
  
      import_needed = False
  
      for cls, canner in can_map.items():
          if isinstance(cls, str):
              import_needed = True
              break
          if istype(obj, cls):
              return canner(obj)
  
      if import_needed:
          # perform can_map imports, then try again
          # this will usually only happen once
          _import_mapping(can_map, _original_can_map)
          return can(obj)
  
      return obj
  
imports: import typing
  import warnings
  import copy
  import pickle
  import sys
  from types import FunctionType
  from ipyparallel.serialize import codeutil
  from traitlets.log import get_logger
  from traitlets.utils.importstring import import_item
label_desc: Use image node_id 7 for calling a global function with example usage: can(obj) and returns: obj, can, canner