code: def testSourceMap(self):
      source_map = tf_stack._tf_stack.PyBindSourceMap()
  
      def func(n):
          if n == 0:
              return tf_stack._tf_stack.extract_stack(
                  source_map, tf_stack._tf_stack.PyBindFileSet()
              )
          else:
              return func(n - 1)
  
      trace = func(5)
      source_map.update_to(
          (
              (
                  (trace[0].filename, trace[0].lineno),
                  ("filename", 42, "function_name"),
              ),
          )
      )
      trace = list(func(5))
      self.assertEqual(
          str(trace[0]), 'File "filename", line 42, in function_name'
      )
  
file_path: tensorflow/tensorflow/python/util/tf_stack_test.py
imports: from tensorflow.python.platform import test
  from tensorflow.python.util import tf_stack
label_desc: Use image node_id 6 for calling the TFStackTest obj's underlying member method code with example usage: obj.testSourceMap() and returns: tf_stack, func