code: def get_search_datasets(config):
      dataset = config.dataset.lower()
      if dataset == "cifar10":
          dset_cls = dset.CIFAR10
          n_classes = 10
      elif dataset == "cifar100":
          dset_cls = dset.CIFAR100
          n_classes = 100
      else:
          raise Exception("Not support dataset!")
  
      train_transform, valid_transform = data_transforms_cifar(
          config, cutout=False
      )
      train_data = dset_cls(
          root=config.data_dir,
          train=True,
          download=True,
          transform=train_transform,
      )
      test_data = dset_cls(
          root=config.data_dir,
          train=False,
          download=True,
          transform=valid_transform,
      )
  
      num_train = len(train_data)
      indices = list(range(num_train))
      split_mid = int(np.floor(0.5 * num_train))
  
      if config.distributed:
          train_sampler = SubsetDistributedSampler(
              train_data, indices[:split_mid]
          )
          valid_sampler = SubsetDistributedSampler(
              train_data, indices[split_mid:num_train]
          )
      else:
          train_sampler = torch.utils.data.sampler.SubsetRandomSampler(
              indices[:split_mid]
          )
          valid_sampler = torch.utils.data.sampler.SubsetRandomSampler(
              indices[split_mid:num_train]
          )
  
      train_loader = torch.utils.data.DataLoader(
          train_data,
          batch_size=config.batch_size,
          sampler=train_sampler,
          pin_memory=False,
          num_workers=config.workers,
      )
  
      valid_loader = torch.utils.data.DataLoader(
          train_data,
          batch_size=config.batch_size,
          sampler=valid_sampler,
          pin_memory=False,
          num_workers=config.workers,
      )
  
      return [train_loader, valid_loader], [
          train_sampler,
          valid_sampler,
      ]
  
file_path: nni/examples/nas/legacy/cdarts/datasets/cifar.py
imports: import numpy
  import torch
  import torchvision.datasets
  import torchvision.transforms
  from datasets.data_utils import CIFAR10Policy, Cutout
  from datasets.data_utils import SubsetDistributedSampler
label_desc: Use image node_id 2 for calling a global function with example usage: get_search_datasets(config) and returns: list,  list