code: def testFindIndexOfDefiningFrameForOp(self):
      with ops.Graph().as_default():
          local_op = constant_op.constant(42).op
          user_filename = "hope.py"
          modified_tb = _modify_op_stack_with_filenames(
              local_op.traceback,
              num_user_frames=3,
              user_filename=user_filename,
              num_inner_tf_frames=5,
          )
          idx = error_interpolation._find_index_of_defining_frame(
              modified_tb
          )
          # Expected frame is 6th from the end because there are 5 inner frames with
          # TF filenames.
          expected_frame = len(modified_tb) - 6
          self.assertEqual(expected_frame, idx)
  
imports: import collections
  import os
  import re
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import error_interpolation
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework import traceable_stack
  from tensorflow.python.ops import control_flow_assert
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the InterpolateFilenamesAndLineNumbersTest obj's underlying member method code with example usage: obj.testFindIndexOfDefiningFrameForOp() without return types