class_docstr: This is an image hash containing a list of individual hashes for segments of the image.
  The matching logic is implemented as described in Efficient Cropping-Resistant Robust Image Hashing
docstr: Gets the difference between two multi-hashes, as a tuple. The first element of the tuple is the number of
  matching segments, and the second element is the sum of the hamming distances of matching hashes.
  NOTE: Do not order directly by this tuple, as higher is better for matches, and worse for hamming cutoff.
  :param other_hash: The image multi hash to compare against
  :param hamming_cutoff: The maximum hamming distance to a region hash in the target hash
  :param bit_error_rate: Percentage of bits which can be incorrect, an alternative to the hamming cutoff. The
  default of 0.25 means that the segment hashes can be up to 25% different
code: def hash_diff(
      self, other_hash, hamming_cutoff=None, bit_error_rate=None
  ):
      # type: (ImageMultiHash, float | None, float | None) -> tuple[int, int]
      """
      Gets the difference between two multi-hashes, as a tuple. The first element of the tuple is the number of
      matching segments, and the second element is the sum of the hamming distances of matching hashes.
      NOTE: Do not order directly by this tuple, as higher is better for matches, and worse for hamming cutoff.
      :param other_hash: The image multi hash to compare against
      :param hamming_cutoff: The maximum hamming distance to a region hash in the target hash
      :param bit_error_rate: Percentage of bits which can be incorrect, an alternative to the hamming cutoff. The
      default of 0.25 means that the segment hashes can be up to 25% different
      """
      # Set default hamming cutoff if it's not set.
      if hamming_cutoff is None:
          if bit_error_rate is None:
              bit_error_rate = 0.25
          hamming_cutoff = len(self.segment_hashes[0]) * bit_error_rate
      # Get the hash distance for each region hash within cutoff
      distances = []
      for segment_hash in self.segment_hashes:
          lowest_distance = min(
              segment_hash - other_segment_hash
              for other_segment_hash in other_hash.segment_hashes
          )
          if lowest_distance > hamming_cutoff:
              continue
          distances.append(lowest_distance)
      return len(distances), sum(distances)
  
imports: from __future__ import absolute_import, division, print_function
  import sys
  import numpy
  from PIL import Image, ImageFilter
label_desc: Use image node_id 8 for calling the ImageMultiHash obj's underlying member method code with example usage: obj.hash_diff(other_hash, hamming_cutoff, bit_error_rate) and returns: len,  sum