code: def test_explicit_writer(self):
      writer = tf.compat.v2.summary.create_file_writer(
          self.logdir,
          filename_suffix=".magic",
      )
      self._initialize_model(writer=writer)
      self.model.fit(x=[(1,)], y=[(2,)], callbacks=[self.callback])
  
      files = os.listdir(self.logdir)
      self.assertEqual(len(files), 1, files)
      filename = files[0]
      self.assertTrue(filename.endswith(".magic"), filename)
  
file_path: tensorboard/tensorboard/plugins/hparams/_keras_test.py
imports: import os
  from unittest import mock
  from google.protobuf import text_format
  import tensorflow
  from tensorboard.plugins.hparams import _keras
  from tensorboard.plugins.hparams import metadata
  from tensorboard.plugins.hparams import plugin_data_pb2
  from tensorboard.plugins.hparams import summary_v2
label_desc: Use image node_id 4 for calling the CallbackTest obj's underlying member method code with example usage: obj.test_explicit_writer() without return types