code: def _create_executor(ctx, executor):
      def save_argument(e, arg_name):
          arg = executor.get(arg_name, None)
          if arg is not None:
              setattr(e, arg_name, arg)
  
      name, network, remap = (
          executor["name"],
          ctx.networks[executor["network"]],
          executor.get("remp", {}),
      )
  
      generator_variables = executor.get("generator_variables", [])
      proto_network = ctx.proto_graphs[
          executor["network"]
      ].default_graph()
  
      e = nnabla_pb2.Executor()
      e.name = name
      e.network_name = network.name
  
      save_argument(e, "no_image_normalization")
      save_argument(e, "num_evaluations")
      save_argument(e, "repeat_evaluation_type")
      save_argument(e, "need_back_propagation")
  
      for vname in executor.get("data", proto_network.inputs):
          if vname not in proto_network.variables:
              raise ValueError(
                  "{} is not found in networks!".format(vname)
              )
          dv = e.data_variable.add()
          dv.variable_name = vname
          dv.data_name = remap.get(vname, vname)
      for vname in executor.get("output", proto_network.outputs):
          if vname not in proto_network.variables:
              raise ValueError(
                  "{} is not found in networks!".format(vname)
              )
          ov = e.output_variable.add()
          ov.variable_name = vname
          ov.data_name = remap.get(vname, vname)
      for param in proto_network.parameters.keys():
          d = e.parameter_variable.add()
          d.variable_name = param
      for vname in generator_variables:
          d = e.generator_variable.add()
          d.type = "Constant"
          d.multiplier = 0
          d.variable_name = vname
      return e
  
file_path: nnabla/python/src/nnabla/utils/save.py
imports: import os
  import re
  import types
  import nnabla
  import numpy
  from collections import OrderedDict
  from nnabla.logger import logger
  from nnabla.parameter import get_parameters
  from nnabla.utils import nnabla_pb2
  from nnabla.utils.get_file_handle import FileHandlerContext, get_default_file_savers, save_files
label_desc: Use image node_id 8 for calling a global function with example usage: _create_executor(ctx, executor) and returns: e