code: def print_training_progress(trainer, mb, frequency):
      training_loss = "NA"
      eval_error = "NA"
  
      if mb % frequency == 0:
          training_loss = trainer.previous_minibatch_loss_average
          eval_error = trainer.previous_minibatch_evaluation_average
  
      return mb, training_loss, eval_error
  
imports: from __future__ import division, print_function
  import numpy
  import cntk
  from cntk.ops.tests.ops_test_utils import cntk_device, mem_used, os_process
  from cntk.ops.functions import UserFunction
  from cntk import sigmoid
label_desc: Use image node_id 5 for calling a global function with example usage: print_training_progress(trainer, mb, frequency) and returns: mb,  training_loss,  eval_error