code: def train_cifar_resnet_for_eval(test_device, output_dir):
      output_dir = os.path.abspath(output_dir)
      if not os.path.isdir(output_dir):
          os.mkdir(output_dir)
      base_path = prepare_test_data.prepare_CIFAR10_data()
  
      # change dir to locate data.zip correctly
      os.chdir(base_path)
  
      if test_device == "cpu":
          print(
              "train cifar_resnet only on GPU device. Use pre-trained models."
          )
      else:
          print("training cifar_resnet on GPU device...")
          reader_train = TrainResNet_CIFAR10.create_image_mb_source(
              os.path.join(base_path, "train_map.txt"),
              os.path.join(base_path, "CIFAR-10_mean.xml"),
              True,
              total_number_of_samples=1 * 50000,
          )
          reader_test = TrainResNet_CIFAR10.create_image_mb_source(
              os.path.join(base_path, "test_map.txt"),
              os.path.join(base_path, "CIFAR-10_mean.xml"),
              False,
              total_number_of_samples=cntk.io.FULL_DATA_SWEEP,
          )
          TrainResNet_CIFAR10.train_and_evaluate(
              reader_train,
              reader_test,
              "resnet20",
              epoch_size=512,
              max_epochs=1,
              profiler_dir=None,
              model_dir=output_dir,
          )
  
      return base_path
  
file_path: CNTK/Tests/EndToEndTests/EvalClientTests/CNTKLibraryCSEvalExamplesTest/train_models_for_evaluation.py
imports: import os
  import sys
  import argparse
  import zipfile
  import math
  import cntk
  import prepare_test_data
  import TrainResNet_CIFAR10
  import LanguageUnderstanding
  from cntk.layers.typing import *
  from cntk import *
  from cntk.logging import *
label_desc: Use image node_id 2 for calling a global function with example usage: train_cifar_resnet_for_eval(test_device, output_dir) and returns: base_path