docs: def hashing_function_from_properties(
          fhp  # type: FieldHashingProperties
          ):
      # type: (...) -> Callable[[Iterable[str], Sequence[bytes], Sequence[int], int, str], bitarray]
      """ Get the hashing function for this field
          :param fhp: hashing properties for this field
          :return: the hashing function
      """
      if fhp.hash_type == 'doubleHash':
          if fhp.prevent_singularity:
              return double_hash_encode_ngrams_non_singular
          else:
              return double_hash_encode_ngrams
      elif fhp.hash_type == 'blakeHash':
          return blake_encode_ngrams
      else:
          msg = "Unsupported hash type '{}'".format(fhp.hash_type)
          raise ValueError(msg)