code: def test_capture_by_nested_function(self, capture_type):
      def f():
          def g():
              return x
  
          return g()
  
      tf_f = tf.function(f)
  
      x = capture_type(1)
      self.assertEqual(f(), tf_f())
      x = capture_type(2)
      self.assertEqual(f(), tf_f())
  
file_path: tensorflow/tensorflow/core/function/integration_test/side_inputs_test.py
imports: import unittest
  from absl.testing import parameterized
  import tensorflow
label_desc: Use image node_id 6 for calling the SideInputsTest obj's underlying member method code with example usage: obj.test_capture_by_nested_function(capture_type) and returns: g, x