def METHOD_NAME(self, train: bool) -> Any:
    transform = transforms.Compose(
        [transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]
    )
    # Use a file lock so that workers on the same node attempt the download one at a time.
    # The first worker will actually perform the download, while the subsequent workers will
    # see that the dataset is downloaded and skip.
    with filelock.FileLock(os.path.join(self.download_directory, "lock")):
        return torchvision.datasets.CIFAR10(
            root=self.download_directory, train=train, download=True, transform=transform
        )