code: def check_hash_stored(self, func, image, sizes=CHECK_HASH_DEFAULT):
      for hash_size in sizes:
          image_hash = func(image, hash_size)
          other_hash = imagehash.hex_to_hash(str(image_hash))
          emsg = "stringified hash {} != original hash {}".format(
              other_hash, image_hash
          )
          self.assertEqual(image_hash, other_hash, emsg)
          distance = image_hash - other_hash
          emsg = "unexpected hamming distance {}: original hash {} - stringified hash {}".format(
              distance, image_hash, other_hash
          )
          self.assertEqual(distance, 0, emsg)
  
file_path: imagehash/tests/utils.py
imports: from __future__ import absolute_import, division, print_function
  import os
  import os.path
  import unittest
  from PIL import Image
  import imagehash
label_desc: Use image node_id 4 for calling the TestImageHash obj's underlying member method code with example usage: obj.check_hash_stored(func, image, sizes) without return types