code: def get_mnist_dataset(loader):  # pragma: no cover
      """Downloads MNIST as PyTorch dataset.
  
      Parameters
      ----------
      loader : str (values: 'train' or 'test')."""
      dataset = datasets.MNIST(
          root="../data",
          train=(loader == "train"),
          download=True,
          transform=transforms.Compose(
              [
                  transforms.ToTensor(),
                  transforms.Normalize((0.1307,), (0.3081,)),
              ]
          ),
      )
      return dataset
  
imports: from sklearn.base import BaseEstimator
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from torchvision import datasets, transforms
  from torch.autograd import Variable
  from torch.utils.data.sampler import SubsetRandomSampler
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: get_mnist_dataset(loader) and returns: dataset