code: def get_training_arg_index(call_fn):
      """Returns the index of 'training' in the layer call function arguments.
  
      Args:
        call_fn: Call function.
  
      Returns:
        - n: index of 'training' in the call function arguments.
        - -1: if 'training' is not found in the arguments, but layer.call accepts
              variable keyword arguments
        - None: if layer doesn't expect a training argument.
      """
      argspec = tf_inspect.getfullargspec(call_fn)
      if argspec.varargs:
          # When there are variable args, training must be a keyword arg.
          if "training" in argspec.kwonlyargs or argspec.varkw:
              return -1
          return None
      else:
          # Try to find 'training' in the list of args or kwargs.
          arg_list = argspec.args
          if tf_inspect.ismethod(call_fn):
              arg_list = arg_list[1:]
  
          if "training" in arg_list:
              return arg_list.index("training")
          elif "training" in argspec.kwonlyargs or argspec.varkw:
              return -1
          return None
  
imports: import itertools
  import threading
  import types
  from tensorflow.python.eager import context
  from tensorflow.python.keras import backend
  from tensorflow.python.keras.engine import base_layer_utils
  from tensorflow.python.keras.utils import control_flow_util
  from tensorflow.python.keras.utils import tf_contextlib
  from tensorflow.python.keras.utils import tf_inspect
  from tensorflow.python.keras.utils.generic_utils import LazyLoader
  from tensorflow.python.util import tf_decorator
label_desc: Use image node_id 6 for calling a global function with example usage: get_training_arg_index(call_fn) and returns: None, None, unknown, arg_list, unknown