code: def _get_directly_modifable_layer_idxs(nn):
      """Returns indices that are directly modifiable in the network."""
      if isinstance(nn, ConvNeuralNetwork):
          return [
              i
              for i in range(nn.num_layers)
              if (
                  nn.layer_labels[i].startswith("res")
                  or nn.layer_labels[i].startswith("conv")
                  or nn.layer_labels[i] == "fc"
              )
          ]
      elif isinstance(nn, MultiLayerPerceptron):
          return [
              i
              for i in range(nn.num_layers)
              if nn.layer_labels[i] in MLP_RECTIFIERS + MLP_SIGMOIDS
          ]
      else:
          raise ValueError("Unidentified nn type: %s" % (nn.nn_class))
  
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 20 for calling a global function with example usage: _get_directly_modifable_layer_idxs(nn) and returns: unknown, unknown