code: def prepare(cfg, use_arg_parser=True):
      cfg.MB_SIZE = 1
      cfg.NUM_CHANNELS = 3
      cfg.OUTPUT_PATH = os.path.join(abs_path, "Output")
      cfg["DATA"].MAP_FILE_PATH = os.path.join(
          abs_path, cfg["DATA"].MAP_FILE_PATH
      )
      running_locally = os.path.exists(cfg["DATA"].MAP_FILE_PATH)
      if running_locally:
          os.chdir(cfg["DATA"].MAP_FILE_PATH)
          if not os.path.exists(os.path.join(abs_path, "Output")):
              os.makedirs(os.path.join(abs_path, "Output"))
          if not os.path.exists(
              os.path.join(abs_path, "Output", cfg["DATA"].DATASET)
          ):
              os.makedirs(
                  os.path.join(abs_path, "Output", cfg["DATA"].DATASET)
              )
      else:
          # disable debug and plot outputs when running on GPU cluster
          cfg["CNTK"].DEBUG_OUTPUT = False
          cfg.VISUALIZE_RESULTS = False
  
      if use_arg_parser:
          parse_arguments(cfg)
  
      data_path = cfg["DATA"].MAP_FILE_PATH
      if not os.path.isdir(data_path):
          raise RuntimeError("Directory %s does not exist" % data_path)
  
      cfg["DATA"].CLASS_MAP_FILE = os.path.join(
          data_path, cfg["DATA"].CLASS_MAP_FILE
      )
      cfg["DATA"].TRAIN_MAP_FILE = os.path.join(
          data_path, cfg["DATA"].TRAIN_MAP_FILE
      )
      cfg["DATA"].TEST_MAP_FILE = os.path.join(
          data_path, cfg["DATA"].TEST_MAP_FILE
      )
      cfg["DATA"].TRAIN_ROI_FILE = os.path.join(
          data_path, cfg["DATA"].TRAIN_ROI_FILE
      )
      cfg["DATA"].TEST_ROI_FILE = os.path.join(
          data_path, cfg["DATA"].TEST_ROI_FILE
      )
      if cfg.USE_PRECOMPUTED_PROPOSALS:
          try:
              cfg[
                  "DATA"
              ].TRAIN_PRECOMPUTED_PROPOSALS_FILE = os.path.join(
                  data_path,
                  cfg["DATA"].TRAIN_PRECOMPUTED_PROPOSALS_FILE,
              )
          except:
              print(
                  "To use precomputed proposals please specify the following parameters in your configuration:\n"
                  "__C.DATA.TRAIN_PRECOMPUTED_PROPOSALS_FILE\n"
                  "__C.DATA.TEST_PRECOMPUTED_PROPOSALS_FILE"
              )
              exit(-1)
  
      cfg["MODEL_PATH"] = os.path.join(
          cfg.OUTPUT_PATH,
          "fast_rcnn_eval_{}.model".format(cfg["MODEL"].BASE_MODEL),
      )
      cfg["BASE_MODEL_PATH"] = os.path.join(
          os.path.dirname(os.path.abspath(__file__)),
          "..",
          "..",
          "..",
          "..",
          "PretrainedModels",
          cfg["MODEL"].BASE_MODEL_FILE,
      )
  
      cfg["DATA"].CLASSES = parse_class_map_file(
          cfg["DATA"].CLASS_MAP_FILE
      )
      cfg["DATA"].NUM_CLASSES = len(cfg["DATA"].CLASSES)
  
      if cfg["CNTK"].FAST_MODE:
          cfg["CNTK"].MAX_EPOCHS = 1
  
      if cfg["CNTK"].FORCE_DETERMINISTIC:
          force_deterministic_algorithms()
      np.random.seed(seed=cfg.RND_SEED)
  
imports: from __future__ import print_function
  import numpy
  import os, sys
  import argparse
  import easydict
  import cntk
  from cntk import Trainer, load_model, Axis, input_variable, parameter, times, combine, softmax, roipooling, plus, element_times, CloneMethod, alias, Communicator, reduce_sum
  from cntk.core import Value
  from cntk.initializer import normal
  from cntk.layers import placeholder, Constant, Sequential
  from cntk.learners import momentum_sgd, learning_parameter_schedule_per_sample, momentum_schedule
  from cntk.logging import log_number_of_parameters, ProgressPrinter
  from cntk.logging.graph import find_by_name, plot
  from cntk.losses import cross_entropy_with_softmax
  from cntk.metrics import classification_error
  from _cntk_py import force_deterministic_algorithms
  from utils.rpn.cntk_smoothL1_loss import SmoothL1Loss
  from utils.annotations.annotations_helper import parse_class_map_file
  from utils.od_mb_source import ObjectDetectionMinibatchSource
  from utils.proposal_helpers import ProposalProvider
label_desc: Use image node_id 1 for calling a global function with example usage: prepare(cfg, use_arg_parser) without return types