code: def _executors(executors_proto, networks):
      class Executor:
          pass
  
      executors = OrderedDict()
  
      for e in executors_proto.executor:
          executor = Executor()
  
          executor.network = networks[e.network_name]
          executor.num_evaluations = (
              e.num_evaluations if e.num_evaluations > 0 else 1
          )
          executor.repeat_evaluation_type = e.repeat_evaluation_type
          executor.need_back_propagation = e.need_back_propagation
          executor.no_image_normalization = e.no_image_normalization
  
          executor.dataset_assign = OrderedDict()
          for d in e.data_variable:
              executor.dataset_assign[
                  executor.network.variables[d.variable_name]
              ] = d.data_name
  
          executor.generator_assign = OrderedDict()
          for g in e.generator_variable:
              executor.generator_assign[
                  executor.network.variables[g.variable_name]
              ] = _get_generator(g)
  
          executor.output_assign = OrderedDict()
          for o in e.output_variable:
              executor.output_assign[
                  executor.network.variables[o.variable_name]
              ] = [o.type, o.data_name]
  
          executor.parameters = OrderedDict()
          for p in e.parameter_variable:
              param_variable_names = _get_matching_variable_names(
                  p.variable_name, executor.network.variables.keys()
              )
              for v_name in param_variable_names:
                  executor.parameters[
                      executor.network.variables[v_name]
                  ] = v_name
  
          executor.forward_sequence = (
              executor.network.get_forward_sequence(
                  [o for o in executor.output_assign.keys()]
              )
          )
  
          if executor.need_back_propagation:
              executor.loss_variables = []
              for l in e.loss_variable:
                  executor.loss_variables.append(
                      executor.network.variables[l.variable_name]
                  )
  
              executor.parameter_learning_rate_multipliers = (
                  OrderedDict()
              )
              for p in e.parameter_variable:
                  param_variable_names = _get_matching_variable_names(
                      p.variable_name, executor.network.variables.keys()
                  )
                  for v_name in param_variable_names:
                      executor.parameter_learning_rate_multipliers[
                          executor.network.variables[v_name]
                      ] = p.learning_rate_multiplier
  
              executor.backward_sequence = (
                  executor.network.get_backward_sequence(
                      executor.loss_variables,
                      executor.parameter_learning_rate_multipliers,
                  )
              )
  
          executors[e.name] = executor
  
      return executors
  
imports: from collections import OrderedDict
  import google.protobuf.text_format
  import itertools
  import numpy
  import os
  import re
  import shutil
  import tempfile
  from nnabla.initializer import NormalInitializer, UniformInitializer, ConstantInitializer, RangeInitializer, calc_normal_std_he_forward, calc_normal_std_he_backward, calc_normal_std_glorot, calc_uniform_lim_glorot
  from nnabla.logger import logger
  from nnabla.parameter import get_parameter_or_create
  from nnabla.utils import nnabla_pb2
  from nnabla.utils.data_iterator import data_iterator_csv_dataset, data_iterator_cache
  from nnabla.utils.create_cache import CreateCache
  from nnabla.utils.load_function import _create_function_instance
  from nnabla.utils.nnp_format import nnp_version
  from nnabla.utils.communicator_util import current_communicator, single_or_rankzero
  from nnabla.utils.learning_rate_scheduler import PolynomialScheduler, CosineScheduler, ExponentialScheduler, StepScheduler, LinearWarmupScheduler
  from legacy_network import Network
  from nnabla.utils.progress import progress
  from legacy_get_file_handle import get_file_handle_load, get_buf_type
  import nnabla
  import nnabla.function
  import nnabla.solver
label_desc: Use image node_id 17 for calling a global function with example usage: _executors(executors_proto, networks) and returns: executors