code: def get_list_of_single_layer_modifiers(
      old_nn,
      inc_or_dec,
      num_layers_to_modify="all",
      change_frac=_DFLT_CHANGE_FRAC,
  ):
      """Returns a list of primitives which change old_nn in one layer."""
  
      # Define a local function to obtain the modifier
      def _get_modifier(_ltm, _change_val):
          """Gets a modifier with the current values of ltm and change_val."""
          return lambda nn: change_num_units_in_layers(
              nn, [_ltm], [_change_val]
          )
  
      # The problem with doing ret.append(lamda nn ....(nn, ltm, change_val)) is that python
      # uses the current values of the variables ltm and change_val when calling - and this
      # turns out to be the last value in layers_to_modify. i.e. Python looks up the
      # variable name at the time the function is called, not when it is created.
      # See this:
      # https://stackoverflow.com/questions/10452770/python-lambdas-binding-to-local-values
      change_ratio = _get_change_ratio_from_change_frac(
          change_frac, inc_or_dec
      )
      layers_to_modify = _get_candidate_layers_for_modifying_num_units(
          old_nn, num_layers_to_modify
      )
      ret = []
      for ltm in layers_to_modify:
          change_val = round(
              change_ratio * old_nn.num_units_in_each_layer[ltm]
          )
          ret.append(_get_modifier(ltm, change_val))
      return ret
  
imports: from argparse import Namespace
  from copy import deepcopy
  import numpy
  from .neural_network import ConvNeuralNetwork, MultiLayerPerceptron, MLP_RECTIFIERS, MLP_SIGMOIDS, is_a_pooling_layer_label, is_a_conv_layer_label, CNNImageSizeMismatchException, CNNNoConvAfterIPException
  from ..utils.general_utils import reorder_list_or_array, reorder_rows_and_cols_in_matrix
  from ..utils.option_handler import get_option_specs, load_options
  from ..utils.reporters import get_reporter
label_desc: Use image node_id 25 for calling a global function with example usage: get_list_of_single_layer_modifiers(old_nn, inc_or_dec, num_layers_to_modify, change_frac) and returns: ret, function