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 __init__(self, hash_name="md5"):
      self.stream = io.BytesIO()
      # By default we want a pickle protocol that only changes with
      # the major python version and not the minor one
      protocol = (
          pickle.DEFAULT_PROTOCOL
          if PY3_OR_LATER
          else pickle.HIGHEST_PROTOCOL
      )
      Pickler.__init__(self, self.stream, protocol=protocol)
      # Initialise the hash obj
      self._hash = hashlib.new(hash_name)
  
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 1 to create a new Hasher object from inherited base classes: Pickler with example: obj = Hasher(hash_name)