def dummy_image_dataset():
    """Returns a PyTorch image dataset of 10 classes."""
    global image_data

    if image_data is None:
        image_data = MNIST(
            root=default_dataset_location("mnist"),
            train=True,
            download=True,
        )
    return image_data
Returns a PyTorch image dataset of 10 classes.
tests/unit_tests_utils.py