code: def _get_cifar(name, withlabel, ndim, scale, dtype):
      root = download.get_dataset_directory(
          os.path.join("pfnet", "chainer", "cifar")
      )
      npz_path = os.path.join(root, "{}.npz".format(name))
      url = "https://www.cs.toronto.edu/~kriz/{}-python.tar.gz".format(
          name
      )
  
      def creator(path):
          archive_path = download.cached_download(url)
  
          if name == "cifar-10":
              train_x = numpy.empty((5, 10000, 3072), dtype=numpy.uint8)
              train_y = numpy.empty((5, 10000), dtype=numpy.uint8)
              test_y = numpy.empty(10000, dtype=numpy.uint8)
  
              dir_name = "{}-batches-py".format(name)
  
              with tarfile.open(archive_path, "r:gz") as archive:
                  # training set
                  for i in range(5):
                      file_name = "{}/data_batch_{}".format(
                          dir_name, i + 1
                      )
                      d = _pickle_load(archive.extractfile(file_name))
                      train_x[i] = d["data"]
                      train_y[i] = d["labels"]
  
                  # test set
                  file_name = "{}/test_batch".format(dir_name)
                  d = _pickle_load(archive.extractfile(file_name))
                  test_x = d["data"]
                  test_y[...] = d["labels"]  # copy to array
  
              train_x = train_x.reshape(50000, 3072)
              train_y = train_y.reshape(50000)
          else:
              # name == 'cifar-100'
              def load(archive, file_name):
                  d = _pickle_load(archive.extractfile(file_name))
                  x = d["data"].reshape((-1, 3072))
                  y = numpy.array(d["fine_labels"], dtype=numpy.uint8)
                  return x, y
  
              with tarfile.open(archive_path, "r:gz") as archive:
                  train_x, train_y = load(
                      archive, "cifar-100-python/train"
                  )
                  test_x, test_y = load(
                      archive, "cifar-100-python/test"
                  )
  
          numpy.savez_compressed(
              path,
              train_x=train_x,
              train_y=train_y,
              test_x=test_x,
              test_y=test_y,
          )
          return {
              "train_x": train_x,
              "train_y": train_y,
              "test_x": test_x,
              "test_y": test_y,
          }
  
      raw = download.cache_or_load_file(npz_path, creator, numpy.load)
      train = _preprocess_cifar(
          raw["train_x"], raw["train_y"], withlabel, ndim, scale, dtype
      )
      test = _preprocess_cifar(
          raw["test_x"], raw["test_y"], withlabel, ndim, scale, dtype
      )
      return train, test
  
file_path: chainer/chainer/datasets/cifar.py
imports: import os
  import sys
  import tarfile
  import numpy
  import six.moves.cPickle
  import chainer
  from chainer.dataset import download
  from chainer.datasets import tuple_dataset
label_desc: Use image node_id 3 for calling a global function with example usage: _get_cifar(name, withlabel, ndim, scale, dtype) and returns: train,  test, dict, x,  y