code: def __init__(self, f):
      self._check_type(f)
      self.code = f.__code__
      if f.__defaults__:
          self.defaults = [can(fd) for fd in f.__defaults__]
      else:
          self.defaults = None
  
      closure = py3compat.get_closure(f)
      if closure:
          self.closure = tuple(can(cell) for cell in closure)
      else:
          self.closure = None
  
      self.module = f.__module__ or "__main__"
      self.__name__ = f.__name__
      self.buffers = []
  
imports: import warnings
  import copy
  import sys
  from types import FunctionType
  from ipython_genutils import py3compat
  from ipython_genutils.importstring import import_item
  from ipython_genutils.py3compat import string_types, iteritems, buffer_to_bytes, buffer_to_bytes_py2
  from traitlets.log import get_logger
label_desc: Use image node_id 1 to create a new CannedFunction object from inherited base classes: CannedObject with example: obj = CannedFunction(f)