code: def test_epoch_metrics(self, mock_board, _):
      mock_board.return_value = Mock()
      mock_board.return_value.add_scalar = Mock()
  
      state = {
          torchbearer.MODEL: nn.Sequential(nn.Conv2d(3, 3, 3)),
          torchbearer.EPOCH: 0,
          torchbearer.METRICS: {"test": 1},
      }
  
      tboard = TensorBoard(
          write_batch_metrics=False, write_epoch_metrics=True
      )
      tboard.on_start(state)
      tboard.on_start_epoch(state)
      tboard.on_end_epoch(state)
      mock_board.return_value.add_scalar.assert_called_once_with(
          "epoch/test", 1, 0
      )
      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 21 for calling the TestTensorBoard obj's underlying member method code with example usage: obj.test_epoch_metrics(mock_board, _) without return types