keras/src/layers/preprocessing/hashing.py/Hashing/call
class Hashing:    def call(self, inputs):
        from keras.src.backend import tensorflow as tf_backend

        inputs = tf_utils.ensure_tensor(inputs)
        if self.output_mode == "one_hot" and inputs.shape[-1] == 1:
            # One hot only unpranks if the final dimension is not 1.
            inputs = tf_backend.numpy.squeeze(inputs, axis=-1)
        if isinstance(inputs, tf.SparseTensor):
            indices = tf.SparseTensor(
                indices=inputs.indices,
                values=self._hash_values_to_bins(inputs.values),
                dense_shape=inputs.dense_shape,
            )
        else:
            indices = self._hash_values_to_bins(inputs)
        outputs = numerical_utils.encode_categorical_inputs(
            indices,
            output_mode=self.output_mode,
            depth=self.num_bins,
            sparse=self.sparse,
            dtype=self.dtype,
            backend_module=tf_backend,
        )
        return backend_utils.convert_tf_tensor(outputs)