class_docstr: A subclass of pickler, to do cryptographic hashing, rather than
  pickling.
class_docstr_tok: ["A","subclass","of","pickler",",","to","do","cryptographic","hashing",",","rather","than","pickling","."]
code: def save(self, obj):
      if isinstance(obj, (types.MethodType, type({}.pop))):
          # the Pickler cannot pickle instance methods; here we decompose
          # them into components that make them uniquely identifiable
          if hasattr(obj, "__func__"):
              func_name = obj.__func__.__name__
          else:
              func_name = obj.__name__
          inst = obj.__self__
          if type(inst) == type(pickle):
              obj = _MyHash(func_name, inst.__name__)
          elif inst is None:
              # type(None) or type(module) do not pickle
              obj = _MyHash(func_name, inst)
          else:
              cls = obj.__self__.__class__
              obj = _MyHash(func_name, inst, cls)
      Pickler.save(self, obj)
  
imports: import pickle
  import hashlib
  import sys
  import types
  import struct
  import io
  from ._compat import _bytes_or_unicode, PY3_OR_LATER
label_desc: Use image node_id 3 for calling the Hasher obj's underlying member method code with example usage: obj.save(obj) without return types