code: def _format_cgload_log(cg_load):
      narr = np.array(cg_load).T
      if narr.shape[0] == 4:
          log_str = "average load:{{cpu:{:.1f}%, gpu:{:.1f}%}}".format(
              np.mean(narr[1]), np.mean(narr[3])
          )
      else:
          log_str = "average load:{{cpu:{:.1f}%}}".format(
              np.mean(narr[1])
          )
      return log_str
  
imports: import glob
  import os
  import time
  import zipfile
  from collections import OrderedDict
  import nnabla
  import nnabla.utils.callback
  import nnabla.utils.load
  import numpy
  from contextlib2 import ExitStack
  from nnabla import available_contexts
  from nnabla.config import nnabla_config
  from nnabla.logger import logger
  from nnabla.parameter import save_parameters
  from nnabla.utils.cli.utility import NodeTimeInfoCollector
  from nnabla.utils.cli.utility import get_cpu_gpu_average_load
  from nnabla.utils.cli.utility import let_data_to_variable
  from nnabla.utils.cli.utility import lms_scheduler
  from nnabla.utils.cli.utility import load_train_state
  from nnabla.utils.cli.utility import measure_cpu_gpu_instant_load
  from nnabla.utils.cli.utility import save_optimizer_states
  from nnabla.utils.cli.utility import str_to_num
  from nnabla.utils.communicator_util import current_communicator, single_or_rankzero
  from nnabla.utils.nnp_format import nnp_version
  from nnabla.utils.progress import configure_progress, progress
  from six.moves import range
label_desc: Use image node_id 8 for calling a global function with example usage: _format_cgload_log(cg_load) and returns: log_str