code: def _console_vars_to_str(console_dict):
      """
      Printing values of variable evaluations to command line output.
      """
      if not console_dict:
          return ""
      if isinstance(console_dict, dict):
          console_str = ", ".join(
              "{}={}".format(key, val)
              for (key, val) in console_dict.items()
          )
      else:
          console_str = "{}".format(console_dict)
      return console_str
  
imports: import itertools
  import time
  from niftynet.engine.application_variables import CONSOLE, TF_SUMMARIES
  from niftynet.engine.signal import TRAIN, VALID, INFER
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 4 for calling a global function with example usage: _console_vars_to_str(console_dict) and returns: console_str, str