code: def _get_current_parameter(args, config):
      def convert_to_info(config):
          class Info:
              pass
  
          ret = Info()
          ret.optimizers = OrderedDict()
          for name, opt in config.optimizers.items():
              ret.optimizers[name] = opt.optimizer
          return ret
  
      best_error, best_epoch = callback.get_best_from_status(args)
  
      globname = os.path.join(args.outdir, "results_current_*.nnp")
      exists = glob.glob(globname)
  
      if len(exists) > 0:
          ex_list = {}
  
          info = convert_to_info(config)
          for ex in exists:
              n = int(ex.rsplit("_", 1)[1].rsplit(".", 1)[0])
              ex_list[n] = ex
  
          last_epoch = sorted(ex_list.keys(), reverse=True)[0]
          last_parameter = ex_list[last_epoch]
          logger.log(
              99,
              "Load parameter from [{}]".format(
                  os.path.basename(last_parameter)
              ),
          )
          # load.load([last_parameter], parameter_only=True)
          load_train_state(last_parameter, info)
          return last_epoch, best_epoch, best_error
  
      return 0, best_epoch, best_error
  
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 5 for calling a global function with example usage: _get_current_parameter(args, config) and returns: int,  best_epoch,  best_error, ret, last_epoch,  best_epoch,  best_error