code: def _get_generator(proto):
      if proto.type == "Normal":
          return NormalInitializer(sigma=proto.multiplier)
      elif proto.type == "Uniform":
          return UniformInitializer(
              lim=(-proto.multiplier, proto.multiplier)
          )
      elif proto.type == "Range":
          return RangeInitializer(start=0, step=proto.multiplier)
      elif proto.type == "Constant":
          return ConstantInitializer(value=proto.multiplier)
      else:
          raise ValueError(
              'Generator type "' + proto.type + '" is not supported.'
          )
  
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 2 for calling a global function with example usage: _get_generator(proto) and returns: NormalInitializer, UniformInitializer, RangeInitializer, ConstantInitializer