class_docstr: A canned object.
class_docstr_tok: ["A","canned","object","."]
docstr: can an object for safe pickling
  
  Parameters
  ----------
  obj
      The object to be canned
  keys : list (optional)
      list of attribute names that will be explicitly canned / uncanned
  hook : callable (optional)
      An optional extra callable,
      which can do additional processing of the uncanned object.
  
  Notes
  -----
  large data may be offloaded into the buffers list,
  used for zero-copy transfers.
docstr_tok: ["can","an","object","for","safe","pickling","Parameters","--","--","--","--","--","obj","The","object","to","be","canned","keys",":","list","(","optional",")","list","of","attribute","names","that","will","be","explicitly","canned","\/","uncanned","hook",":","callable","(","optional",")","An","optional","extra","callable",",","which","can","do","additional","processing","of","the","uncanned","object",".","Notes","--","--","-","large","data","may","be","offloaded","into","the","buffers","list",",","used","for","zero-copy","transfers","."]
code: def __init__(self, obj, keys=None, hook=None):
      """can an object for safe pickling
  
      Parameters
      ----------
      obj
          The object to be canned
      keys : list (optional)
          list of attribute names that will be explicitly canned / uncanned
      hook : callable (optional)
          An optional extra callable,
          which can do additional processing of the uncanned object.
  
      Notes
      -----
      large data may be offloaded into the buffers list,
      used for zero-copy transfers.
      """
      self.keys = keys or []
      self.obj = copy.copy(obj)
      self.hook = can(hook)
      for key in keys:
          setattr(self.obj, key, can(getattr(obj, key)))
  
      self.buffers = []
  
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 1 to create a new CannedObject object  with example: obj = CannedObject(obj, keys, hook)