class_docstr: TestCallback
code: def test_tensorboard(self):
      class MockSW:
          def __init__(self, log_dir, comment=""):
              self.log_dir = log_dir
              self.comment = comment
              self.sw_list = []
  
          def __call__(self, *args, **kwargs):
              return self
  
          def add_scalar(self, *args):
              self.sw_list.append(args)
  
      mock_sw = MockSW(log_dir="runs")
  
      tensorboard_callback = TensorBoardCallBack(
          summary_writer_constructor=mock_sw
      )
      tensorboard_callback.on_train_batch_end(
          batch=(1,), logs=self.logs
      )
      tensorboard_callback.on_eval_batch_end(batch=(1,), logs=self.logs)
  
file_path: towhee/tests/unittests/trainer/test_callback.py
imports: import unittest
  from typing import Dict, Tuple
  from tqdm import tqdm
  from towhee.trainer.callback import TrainerControl, Callback, CallbackList, EarlyStoppingCallback, ModelCheckpointCallback, TensorBoardCallBack, PrintCallBack, ProgressBarCallBack
label_desc: Use image node_id 6 for calling the TestCallback obj's underlying member method code with example usage: obj.test_tensorboard() and returns: self