code: def base_load(
      filenames,
      prepare_data_iterator=True,
      batch_size=None,
      exclude_parameter=False,
      parameter_only=False,
      extension=".nntxt",
      context=None,
  ):
      class Info:
          pass
  
      info = Info()
  
      info.prepare_data_iterator = prepare_data_iterator
      info.batch_size = batch_size
      info.exclude_parameter = exclude_parameter
      info.parameter_only = parameter_only
      info.proto = nnabla_pb2.NNablaProtoBuf()
  
      # first stage file loaders
      file_loaders = get_initial_file_loader()
  
      # using global parameter scope, keep consistency with legacy implementation.
      # To avoid to surprise previous developers, but it is better using
      # stand-alone OrderedDict() instance.
      info.parameter_scope = nn.parameter.get_current_parameter_scope()
      load_files(info, file_loaders, filenames, extension)
  
      default_context = None
      if context:
          if context == "cpu":
              import nnabla_ext.cpu
  
              default_context = nnabla_ext.cpu.context()
          else:
              cs = context.split(":")
              if cs[0] == "cudnn":
                  if len(cs) == 1:
                      devid = 0
                  else:
                      devid = int(cs[1])
              import nnabla_ext.cudnn
  
              default_context = nnabla_ext.cudnn.context(
                  device_id=devid
              )
          if default_context is None:
              logger.warning("Invalid context [{}]".format(context))
          elif info.proto.HasField("global_config"):
              info.global_config = _global_config(info.proto)
              info.global_config.default_context = default_context
  
      if default_context is None:
          if info.proto.HasField("global_config"):
              info.global_config = _global_config(info.proto)
              default_context = info.global_config.default_context
              if "cuda" in default_context.backend:
                  import nnabla_ext.cudnn
              elif "cuda:float" in default_context.backend:
                  try:
                      import nnabla_ext.cudnn
                  except:
                      pass
          else:
              import nnabla_ext.cpu
  
              default_context = nnabla_ext.cpu.context()
              info.global_config = _global_config(
                  None, default_context=default_context
              )
  
      default_context = _check_context(default_context)
      logger.log(99, 'Using context "{}"'.format(default_context))
      comm = current_communicator()
      if comm:
          default_context.device_id = str(comm.local_rank)
      if info.proto.HasField("training_config"):
          info.training_config = _training_config(info.proto)
  
      info.default_context = default_context
      info.datasets = _datasets(
          info.proto,
          prepare_data_iterator
          if prepare_data_iterator is not None
          else info.training_config.max_epoch > 0,
      )
  
      info.renamed_variables = {}
      info.networks = _networks(
          info,
          nn.graph_def.ProtoGraph.from_proto(
              info.proto,
              param_scope=info.parameter_scope,
              rng=numpy.random.RandomState(0),
          ),
      )
  
      info.optimizers = _optimizers(info)
      info.monitors = _monitors(info)
      info.executors = _executors(info)
  
      return info
  
imports: import itertools
  import os
  import re
  from collections import OrderedDict
  import nnabla
  import nnabla.functions
  import nnabla.solver
  import numpy
  from nnabla.core.graph_optimizer import IdentityRemover
  from nnabla.initializer import NormalInitializer, UniformInitializer, ConstantInitializer, RangeInitializer
  from nnabla.logger import logger
  from nnabla.utils import nnabla_pb2
  from nnabla.utils.communicator_util import current_communicator, single_or_rankzero
  from nnabla.utils.create_cache import CreateCache
  from nnabla.utils.data_iterator import data_iterator_csv_dataset, data_iterator_cache
  from nnabla.utils.get_file_handle import get_initial_file_loader, load_files
  from nnabla.utils.learning_rate_scheduler import PolynomialScheduler, CosineScheduler, ExponentialScheduler, StepScheduler, LinearWarmupScheduler
label_desc: Use image node_id 15 for calling a global function with example usage: base_load(filenames, prepare_data_iterator, batch_size, exclude_parameter, parameter_only, extension, context) and returns: info