code: def test_epoch_writer_visdom(self, mock_visdom, mock_writer, _):
      tboard = TensorBoardText(visdom=True, log_trial_summary=False)
  
      metrics = {"test_metric_1": 1, "test_metric_2": 1}
      state = {
          torchbearer.MODEL: nn.Sequential(nn.Conv2d(3, 3, 3)),
          torchbearer.EPOCH: 1,
          torchbearer.METRICS: metrics,
      }
      metric_string = TensorBoardText.table_formatter(str(metrics))
  
      tboard.on_start(state)
      tboard.on_start_training(state)
      tboard.on_start_epoch(state)
      tboard.on_end_epoch(state)
      mock_writer.return_value.add_text.assert_called_once_with(
          "epoch", "<h4>Epoch 1</h4>" + metric_string, 1
      )
      tboard.on_end(state)
  
imports: import os
  from unittest import TestCase
  import warnings
  import torch
  import torch.nn
  from mock import patch, Mock, ANY, MagicMock
  import torchbearer
  from torchbearer.callbacks import TensorBoard, TensorBoardImages, TensorBoardProjector, TensorBoardText
label_desc: Use image node_id 4 for calling the TestTensorbardText obj's underlying member method code with example usage: obj.test_epoch_writer_visdom(mock_visdom, mock_writer, _) without return types