keras/src/layers/preprocessing/index_lookup.py/IndexLookup/_convert_to_ndarray
class IndexLookup:    def _convert_to_ndarray(self, x):
        return np.array(x) if isinstance(x, (list, tuple)) else x