parameters: (self, hasher_spec)
docstring: Returns the string_to_hash_bucket op to use based on `hasher_spec`.
docstring_summary: Returns the string_to_hash_bucket op to use based on `hasher_spec`.
docstring_tokens: Returns the string_to_hash_bucket op to use based on hasher_spec .
function: def _get_string_to_hash_bucket_fn(self, hasher_spec):
      """Returns the string_to_hash_bucket op to use based on `hasher_spec`."""
      if not isinstance(hasher_spec, HasherSpec):
        raise TypeError("hasher_spec must be of type HasherSpec %s" % hasher_spec)
      if hasher_spec.hasher == "fasthash":
        return string_ops.string_to_hash_bucket_fast
      if hasher_spec.hasher == "legacy":
        return string_ops.string_to_hash_bucket
      if hasher_spec.hasher == "stronghash":
        return functools.partial(
            string_ops.string_to_hash_bucket_strong, key=hasher_spec.key)
      raise ValueError("Unknown hasher %s" % hasher_spec.hasher)
function_tokens: def _get_string_to_hash_bucket_fn ( self , hasher_spec ) : if not isinstance ( hasher_spec , HasherSpec ) : raise TypeError ( "hasher_spec must be of type HasherSpec %s" % hasher_spec ) if hasher_spec . hasher == "fasthash" : return string_ops . string_to_hash_bucket_fast if hasher_spec . hasher == "legacy" : return string_ops . string_to_hash_bucket if hasher_spec . hasher == "stronghash" : return functools . partial ( string_ops . string_to_hash_bucket_strong , key = hasher_spec . key ) raise ValueError ( "Unknown hasher %s" % hasher_spec . hasher )