code: def testSummaries(self):
      if not tf.executing_eagerly():
          self.skipTest("Test only works in eager mode.")
      agent, experience, _ = _create_simple_agent_and_data(
          set_example_weights=False
      )
      self.evaluate(agent.initialize())
      logdir = os.path.join(flags.FLAGS.test_tmpdir, "logs")
      summary_writer = tf.summary.create_file_writer(f"{logdir}/train")
      summary_writer.set_as_default()
      self.evaluate(agent.train(experience))
      summary_writer.flush()
      files = tf.io.gfile.glob(f"{logdir}/train/*.v2")
      self.assertLen(files, 1)
      tags = []
      for event in tf.compat.v1.train.summary_iterator(files[0]):
          for value in event.summary.value:
              tags.append(value.tag)
      self.assertIn("Losses/loss", tags)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from typing import Optional, Tuple
  from absl import flags
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.agents import lin_ucb_agent
  from tf_agents.bandits.agents import linear_bandit_agent
  from tf_agents.bandits.agents import linear_thompson_sampling_agent
  from tf_agents.bandits.agents import utils
  from tf_agents.bandits.drivers import driver_utils
  from tf_agents.bandits.specs import utils
  from tf_agents.policies import utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
label_desc: Use image node_id 6 for calling the LinearBanditAgentTest obj's underlying member method code with example usage: obj.testSummaries() without return types