code: def test_merge_all(self, nest_graph):
      c0 = tf.constant(0)
      c1 = tf.constant(1)
  
      scoped_summary0 = _ScopedSummary()
      scoped_summary0.scalar("c0", c0)
      scoped_summary0.scalar("c1", c1)
  
      scoped_summary1 = _ScopedSummary("scope1")
      scoped_summary1.scalar("c0", c0)
      scoped_summary1.scalar("c1", c1)
  
      scoped_summary2 = _ScopedSummary("scope2")
      scoped_summary2.scalar("c0", c0)
      scoped_summary2.scalar("c1", c1)
  
      config = tf.compat.v1.ConfigProto(
          gpu_options=tf.compat.v1.GPUOptions(allow_growth=True)
      )
  
      if nest_graph:
          with tf.Graph().as_default():
              scoped_summary2.scalar("c2", tf.constant(2))
              with tf.Session(config=config) as sess:
                  summaries = scoped_summary2.merge_all()
                  tf.logging.warn("summaries %s", summaries)
                  summary = tf.Summary()
                  summary.ParseFromString(
                      sess.run(tf.summary.merge(summaries))
                  )
                  self.assertEqual(
                      ["c2"], [s.tag for s in summary.value]
                  )
                  self.assertEqual(
                      [2], [s.simple_value for s in summary.value]
                  )
  
      with tf.Session(config=config) as sess:
          for scoped_summary in [
              scoped_summary0,
              scoped_summary1,
              scoped_summary2,
          ]:
              summaries = scoped_summary.merge_all()
              summary = tf.Summary()
              summary.ParseFromString(
                  sess.run(tf.summary.merge(summaries))
              )
              self.assertEqual(
                  ["c0", "c1"], [s.tag for s in summary.value]
              )
              self.assertEqual(
                  [0, 1], [s.simple_value for s in summary.value]
              )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import os
  from absl.testing import parameterized
  from adanet import tf_compat
  from adanet.core import testing_utils
  from adanet.core.summary import _ScopedSummary
  from adanet.core.summary import _TPUScopedSummary
  from adanet.core.summary import monkey_patched_summaries
  from six.moves import range
  import tensorflow.compat.v1
  from tensorflow.python.ops import summary_ops_v2
label_desc: Use image node_id 12 for calling the ScopedSummaryTest obj's underlying member method code with example usage: obj.test_merge_all(nest_graph) without return types