code: def modify_num_units_on_random_nodes(
      nn, num_units, inc_or_dec, change_frac=_DFLT_CHANGE_FRAC
  ):
      """A function to increase or decrase the number of units in a single layer."""
      change_ratio = _get_change_ratio_from_change_frac(
          change_frac, inc_or_dec
      )
      modifiable_layers = _get_directly_modifable_layer_idxs(nn)
      modify_layer_idxs = np.random.choice(
          modifiable_layers, max(num_units, modifiable_layers)
      )
      modify_vals = [
          round(change_ratio * nn.num_units_in_each_layer[i])
          for i in modify_layer_idxs
      ]
      return change_num_units_in_layers(
          nn, modify_layer_idxs, modify_vals
      )
  
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 23 for calling a global function with example usage: modify_num_units_on_random_nodes(nn, num_units, inc_or_dec, change_frac) and returns: change_num_units_in_layers