class_docstr: Pickler that accepts custom reducers.
  
  TODO python2_drop : can this be simplified ?
  
  HIGHEST_PROTOCOL is selected by default as this pickler is used
  to pickle ephemeral datastructures for interprocess communication
  hence no backward compatibility is required.
  
  `reducers` is expected to be a dictionary with key/values
  being `(type, callable)` pairs where `callable` is a function that
  give an instance of `type` will return a tuple `(constructor,
  tuple_of_objects)` to rebuild an instance out of the pickled
  `tuple_of_objects` as would return a `__reduce__` method. See the
  standard library documentation on pickling for more details.
docstr: Attach a reducer function to a given type in the dispatch table.
docstr_tok: ["Attach","a","reducer","function","to","a","given","type","in","the","dispatch","table","."]
code: def register(self, type, reduce_func):
      """Attach a reducer function to a given type in the dispatch table."""
      if hasattr(Pickler, "dispatch"):
          # Python 2 pickler dispatching is not explicitly customizable.
          # Let us use a closure to workaround this limitation.
          def dispatcher(self, obj):
              reduced = reduce_func(obj)
              self.save_reduce(obj=obj, *reduced)
  
          self.dispatch[type] = dispatcher
      else:
          self.dispatch_table[type] = reduce_func
  
imports: import copyreg
  import sys
  import warnings
  from time import sleep
  from pickle import Pickler
  from pickle import HIGHEST_PROTOCOL
  from io import BytesIO
  from ._memmapping_reducer import get_memmapping_reducers
  from ._memmapping_reducer import TemporaryResourcesManager
  from ._multiprocessing_helpers import mp, assert_spawning
  from multiprocessing.pool import Pool
label_desc: Use image node_id 2 for calling the CustomizablePickler obj's underlying member method code with example usage: obj.register(type, reduce_func) without return types