code: def use_dill():
      """use dill to expand serialization support
  
      adds support for object methods and closures to serialization.
      """
      # import dill causes most of the magic
      import dill
  
      # dill doesn't work with cPickle,
      # tell the two relevant modules to use plain pickle
  
      global pickle  # noqa: PLW0603
      pickle = dill
  
      try:
          from ipykernel import serialize
      except ImportError:
          pass
      else:
          serialize.pickle = dill  # type:ignore[attr-defined]
  
      # disable special function handling, let dill take care of it
      can_map.pop(FunctionType, None)
  
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 3 for calling a global function with example usage: use_dill() without return types