code: def get_list_of_skipping_modifiers(nn, num_modifiers=None, **kwargs):
      """Returns a list of operators for Neural networks that create branches in the
      architecture.
      """
  
      # Define a local function to return the modifier
      def _get_skipping_modifier(_start_layer, _end_layer, **_kwargs):
          """Returns a modifier which adds a skip connected from start_layer to end_layer."""
          return lambda arg_nn: create_skipped_network(
              arg_nn, _start_layer, _end_layer, **_kwargs
          )
  
      # Some preprocessing
      num_modifiers = (
          num_modifiers if num_modifiers is not None else nn.num_layers
      )
      max_num_tries = 2 * num_modifiers
      start_layer_prob = (
          _get_start_layer_probs_for_branching_and_skipping(nn)
      )
      start_layer_prob[0] = 0.0
      ret = []
      if sum(start_layer_prob) <= 0.0:
          return ret  # return immediately with an empty list
      for _ in range(max_num_tries):
          start_layer_prob = start_layer_prob / sum(start_layer_prob)
          start_layer = int(
              np.random.choice(nn.num_layers, 1, p=start_layer_prob)
          )
          end_layer_prob = _get_end_layer_probs_for_skipping(
              nn, start_layer
          )
          if end_layer_prob is None:
              continue
          end_layer = int(
              np.random.choice(nn.num_layers, 1, p=end_layer_prob)
          )
          ret.append(
              _get_skipping_modifier(start_layer, end_layer, **kwargs)
          )
          if len(ret) >= num_modifiers:
              break
      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 16 for calling a global function with example usage: get_list_of_skipping_modifiers(nn, num_modifiers) and returns: ret, function, ret