code: def _calc_estimate_time(timeinfo, max_iter, last_iter, iter):
      timeinfo.past_time = time.time() - timeinfo.start_time
      timeinfo.estimate_time = (
          timeinfo.past_time
          * (max_iter - last_iter)
          / (iter - last_iter)
      )
      timeinfo.remain_time = timeinfo.estimate_time - timeinfo.past_time
      timeinfo.last_past_time = timeinfo.past_time
      return timeinfo
  
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 6 for calling a global function with example usage: _calc_estimate_time(timeinfo, max_iter, last_iter, iter) and returns: timeinfo