code: def test_run_in_graph_and_eager_modes_setup_in_same_mode(self):
      modes = []
      mode_name = lambda: "eager" if tf.executing_eagerly() else "graph"
  
      class ExampleTest(test_case.TestCase):
          def runTest(self):
              pass
  
          def setUp(self):
              super(ExampleTest, self).setUp()
              modes.append("setup_" + mode_name())
  
          def subTest(self, msg, **params):
              modes.append("subtest_" + msg)
              return super().subTest(msg, **params)
  
          @test_utils.run_in_graph_and_eager_modes
          def testBody(self):
              modes.append("run_" + mode_name())
  
      e = ExampleTest()
      e.setUp()
      e.testBody()
  
      self.assertEqual(
          modes,
          [
              "setup_eager",
              "subtest_eager_mode",
              "run_eager",
              "subtest_graph_mode",
              "setup_graph",
              "run_graph",
          ],
      )
  
file_path: datasets/tensorflow_datasets/testing/test_utils_test.py
imports: import pathlib
  import pytest
  import tensorflow
  from tensorflow_datasets.testing import test_case
  from tensorflow_datasets.testing import test_utils
label_desc: Use image node_id 2 for calling the RunInGraphAndEagerTest obj's underlying member method code with example usage: obj.test_run_in_graph_and_eager_modes_setup_in_same_mode() and returns: super