keras/src/trainers/data_adapters/array_slicing.py/TensorflowSliceable/__getitem__
class TensorflowSliceable:    def __getitem__(self, indices):
        from keras.src.utils.module_utils import tensorflow as tf

        if isinstance(indices, slice):
            return self.array[indices]
        else:
            return tf.gather(self.array, indices, axis=0)