code: def prepare_CIFAR10_data():
      base_path = os.path.join(
          os.path.dirname(os.path.abspath(__file__)),
          *"../../../../Examples/Image/DataSets/CIFAR-10".split("/"),
      )
      base_path = os.path.normpath(base_path)
  
      # If {train,test}_map.txt don't exist locally, copy to local location
      if not (
          os.path.isfile(os.path.join(base_path, "train_map.txt"))
          and os.path.isfile(os.path.join(base_path, "test_map.txt"))
      ):
          # copy from backup location
          base_path_bak = os.path.join(
              os.environ[envvar],
              *"Image/CIFAR/v0/cifar-10-batches-py".split("/"),
          )
          base_path_bak = os.path.normpath(base_path_bak)
  
          copyfile(
              os.path.join(base_path_bak, "train_map.txt"),
              os.path.join(base_path, "train_map.txt"),
          )
          copyfile(
              os.path.join(base_path_bak, "test_map.txt"),
              os.path.join(base_path, "test_map.txt"),
          )
          if not os.path.isdir(
              os.path.join(base_path, "cifar-10-batches-py")
          ):
              os.mkdir(os.path.join(base_path, "cifar-10-batches-py"))
          copyfile(
              os.path.join(base_path_bak, "data.zip"),
              os.path.join(
                  base_path, "cifar-10-batches-py", "data.zip"
              ),
          )
          copyfile(
              os.path.join(base_path_bak, "CIFAR-10_mean.xml"),
              os.path.join(base_path, "CIFAR-10_mean.xml"),
          )
      return base_path
  
file_path: CNTK/Tests/EndToEndTests/CNTKv2Python/Examples/prepare_test_data.py
imports: import os
  import tarfile
  import zipfile
  from shutil import copyfile
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_CIFAR10_data() and returns: base_path