code: def _forward(args, index, config, data, variables, output_image=True):
      class ForwardResult:
          pass
  
      result = ForwardResult()
      result.dims = []
      result.types = []
      result.names = []
  
      output_index = 0
      for e in config.executors:
          for v, d in e.dataset_assign.items():
              vind = variables.index(d)
              if v.variable_instance.d.shape != data[vind].shape:
                  let_data_to_variable(
                      v.variable_instance,
                      np.reshape(
                          data[vind], v.variable_instance.d.shape
                      ),
                      data_name=d,
                      variable_name=v.name,
                  )
              else:
                  let_data_to_variable(
                      v.variable_instance,
                      data[vind].astype(v.variable_instance.d.dtype),
                      data_name=d,
                      variable_name=v.name,
                  )
  
          # Generate data
          for v, generator in e.generator_assign.items():
              v.variable_instance.d = generator(
                  v.variable_instance.d.shape
              )
  
          # Forward recursive
          sum = [
              np.zeros(
                  o.variable_instance.d.shape,
                  dtype=o.variable_instance.d.dtype,
              )
              for o in e.output_assign.keys()
          ]
          sum_mux = [
              np.zeros(
                  o.variable_instance.d.shape,
                  dtype=o.variable_instance.d.dtype,
              )
              for o in e.output_assign.keys()
          ]
          for i in range(e.num_evaluations):
              e.forward_target.forward(clear_buffer=True)
              if e.need_back_propagation:
                  e.backward_target.backward(clear_buffer=True)
  
              for o_index, o in enumerate(e.output_assign.keys()):
                  if e.repeat_evaluation_type == "last":
                      sum[o_index] = o.variable_instance.d
                  else:
                      sum[o_index] += o.variable_instance.d
                      sum_mux[o_index] += (o.variable_instance.d) ** 2
          if e.repeat_evaluation_type == "last":
              avg = sum
          elif e.repeat_evaluation_type == "std":
              std_result = [
                  np.nan_to_num(
                      np.sqrt(
                          x / e.num_evaluations
                          - (y / e.num_evaluations) ** 2
                      )
                  )
                  for x, y in zip(sum_mux, sum)
              ]
              avg = std_result
          else:
              avg = [s / e.num_evaluations for s in sum]
  
          result_1, outputs_1 = _update_result(
              args,
              index,
              result,
              avg,
              output_index,
              e.output_assign.values(),
              output_image,
          )
          if "outputs" in locals():
              outputs = [
                  output + output_1
                  for output, output_1 in zip(outputs, outputs_1)
              ]
          else:
              outputs = outputs_1
              result = result_1
          output_index += len(avg)
  
      return result, outputs
  
imports: import csv
  import os
  import nnabla.utils.callback
  import nnabla.utils.load
  import numpy
  from nnabla.logger import logger
  from nnabla.utils.cli.utility import let_data_to_variable, is_float, compute_full_path
  from nnabla.utils.data_iterator import data_iterator_cache
  from nnabla.utils.data_iterator import data_iterator_csv_dataset
  from nnabla.utils.data_source_loader import FileReader
  from nnabla.utils.image_utils import imsave
  from nnabla.utils.progress import configure_progress, progress
  from six.moves import map
label_desc: Use image node_id 3 for calling a global function with example usage: _forward(args, index, config, data, variables, output_image) and returns: result,  outputs