keras/src/layers/preprocessing/string_lookup.py/StringLookup/call
class StringLookup:    def call(self, inputs):
        if isinstance(inputs, (tf.Tensor, tf.RaggedTensor, tf.SparseTensor)):
            tf_inputs = True
        else:
            tf_inputs = False
            if not isinstance(inputs, (np.ndarray, list, tuple)):
                inputs = tf.convert_to_tensor(backend.convert_to_numpy(inputs))
        outputs = super().call(inputs)
        if not tf_inputs:
            outputs = backend_utils.convert_tf_tensor(outputs)
        return outputs