code: def find_layer_idx(model, layer_name):
      """Looks up the layer index corresponding to `layer_name` from `model`.
  
      Args:
          model: The `keras.models.Model` instance.
          layer_name: The name of the layer to lookup.
  
      Returns:
          The layer index if found. Raises an exception otherwise.
      """
      layer_idx = None
      for idx, layer in enumerate(model.layers):
          if layer.name == layer_name:
              layer_idx = idx
              break
  
      if layer_idx is None:
          raise ValueError(
              "No layer with name '{}' within the model".format(
                  layer_name
              )
          )
      return layer_idx
  
imports: from __future__ import absolute_import
  from __future__ import division
  import os
  import tempfile
  import math
  import json
  import six
  import numpy
  import matplotlib.font_manager
  from skimage import io, transform
  from keras import backend
  from keras.models import load_model
  import logging
label_desc: Use image node_id 9 for calling a global function with example usage: find_layer_idx(model, layer_name) and returns: layer_idx