code: def check_hash_algorithm(self, func, image):
      original_hash = func(image)
      rotate_image = image.rotate(-1)
      rotate_hash = func(rotate_image)
      distance = original_hash - rotate_hash
      emsg = "slightly rotated image should have similar hash {} {} {}".format(
          original_hash, rotate_hash, distance
      )
      self.assertTrue(distance <= 10, emsg)
      self.assertEqual(original_hash, rotate_hash, emsg)
      rotate_image = image.rotate(180)
      rotate_hash = func(rotate_image)
      emsg = "flipped image should have same hash {} {}".format(
          original_hash, rotate_hash
      )
      self.assertEqual(original_hash, rotate_hash, emsg)
  
file_path: imagehash/tests/test_colorhash.py
imports: from __future__ import absolute_import, division, print_function
  import unittest
  import imagehash
  from .utils import TestImageHash
label_desc: Use image node_id 3 for calling the Test obj's underlying member method code with example usage: obj.check_hash_algorithm(func, image) without return types