keras/src/trainers/data_adapters/array_slicing.py/TorchSliceable/cast
class TorchSliceable:    def cast(cls, x, dtype):
        from keras.src.backend.torch.core import cast

        return cast(x, dtype)