code: def _input_index(op, handle):
      """Returns the index of `handle` in `op.inputs`.
  
      Args:
        op: Operation.
        handle: Resource handle.
  
      Returns:
        Index in `op.inputs` receiving the resource `handle`.
  
      Raises:
        ValueError: If handle and its replicated input are both not found in
        `op.inputs`.
      """
      for i, t in enumerate(op.inputs):
          if handle is t:
              return i
      raise ValueError(
          f"{handle!s} not in list of inputs for op: {op!r}"
      )
  
file_path: tensorflow-upstream/tensorflow/python/framework/auto_control_deps_utils.py
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 6 for calling a global function with example usage: _input_index(op, handle) and returns: i