code: def check_hash_length(self, func, image, binbits=CHECK_HASH_DEFAULT):
      for bit in binbits:
          image_hash = func(image, bit)
          emsg = "bit={} is not respected".format(bit)
          self.assertEqual(
              image_hash.hash.size, (2 + 6 * 2) * bit, 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 8 for calling the Test obj's underlying member method code with example usage: obj.check_hash_length(func, image, binbits) without return types