code: def test_tf_summary_export(self):
      # Ensure that TF wasn't already imported, since we want this test to cover
      # the entire flow of "import tensorflow; use tf.summary" and if TF was in
      # fact already imported that reduces the comprehensiveness of the test.
      # This means this test has to be kept in its own file and that no other
      # test methods in this file should import tensorflow.
      self.assertEqual(
          "notfound", sys.modules.get("tensorflow", "notfound")
      )
      import tensorflow as tf
  
      if not tf.__version__.startswith("2."):
          if hasattr(tf, "compat") and hasattr(tf.compat, "v2"):
              tf = tf.compat.v2
          else:
              self.skipTest("TF v2 summary API not available")
      # Check that tf.summary contains both TB-provided and TF-provided symbols.
      expected_symbols = frozenset(
          ["scalar", "image", "audio", "histogram", "text"]
          + ["write", "create_file_writer", "SummaryWriter"]
      )
      self.assertLessEqual(expected_symbols, frozenset(dir(tf.summary)))
      # Ensure we can dereference symbols as well.
      print(tf.summary.scalar)
      print(tf.summary.write)
  
imports: import sys
  import unittest
label_desc: Use image node_id 1 for calling the TfSummaryExportTest obj's underlying member method code with example usage: obj.test_tf_summary_export() without return types