code: def train_and_test(
      network,
      trainer,
      train_source,
      test_source,
      minibatch_size,
      epoch_size,
      restore,
      profiling=False,
  ):
      # define mapping from intput streams to network inputs
      input_map = {
          network["feature"]: train_source.streams.features,
          network["label"]: train_source.streams.labels,
      }
  
      if profiling:
          C.debugging.start_profiler(sync_gpu=True)
  
      C.train.training_session(
          trainer=trainer,
          mb_source=train_source,
          model_inputs_to_streams=input_map,
          mb_size=minibatch_size,
          progress_frequency=epoch_size,
          checkpoint_config=C.train.CheckpointConfig(
              frequency=epoch_size,
              filename=os.path.join(model_path, model_name),
              restore=restore,
          ),
          test_config=C.train.TestConfig(
              test_source, minibatch_size=minibatch_size
          ),
      ).train()
  
      if profiling:
          C.debugging.stop_profiler()
  
file_path: CNTK/Examples/Image/Classification/GoogLeNet/InceptionV3/Python/InceptionV3_ImageNet_Distributed.py
imports: import os
  import math
  import argparse
  import numpy
  import cntk
  from InceptionV3_ImageNet import create_image_mb_source, create_inception_v3
label_desc: Use image node_id 2 for calling a global function with example usage: train_and_test(network, trainer, train_source, test_source, minibatch_size, epoch_size, restore, profiling) without return types