code: def _determine_num_units_for_wedge_layer(nn, edge):
      """Determines the number of layers for wedging a layer. This is usually the average
      of the parent (edge[0]) and child (edge[1]).
      """
      edge_num_layers = _get_non_None_elements(
          [nn.num_units_in_each_layer[idx] for idx in edge]
      )
      if len(edge_num_layers) > 0:
          return round(sum(edge_num_layers) / len(edge_num_layers))
      else:
          parents = nn.get_parents(edge[0])
          if len(parents) == 0:
              # Means you have reached the input node
              ip_children = nn.get_children(edge[0])
              children_num_units = _get_non_None_elements(
                  [nn.num_units_in_each_layer[ch] for ch in ip_children]
              )
              if len(children_num_units) == 0:
                  # Create a layer with 16 units
                  children_num_units = [16]
              return sum(children_num_units) / len(children_num_units)
          else:
              parent_num_units = _get_non_None_elements(
                  [nn.num_units_in_each_layer[par] for par in parents]
              )
              if len(parent_num_units) > 0:
                  return sum(parent_num_units) / len(parent_num_units)
              else:
                  par_num_units = []
                  for par in parents:
                      par_num_units.append(
                          _determine_num_units_for_wedge_layer(
                              nn, (par, edge[0])
                          )
                      )
                  par_num_units = _get_non_None_elements(par_num_units)
                  return sum(par_num_units) / len(par_num_units)
  
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 6 for calling a global function with example usage: _determine_num_units_for_wedge_layer(nn, edge) and returns: round, unknown, unknown, unknown