code: def test_add_metric_list(self, _, __, writer):
      mock_fn = MagicMock()
  
      def fn_test(ex, types):
          def fn_test_1(tag, metric, *args, **kwargs):
              if type(metric) in types:
                  raise ex
              else:
                  mock_fn(tag, metric)
  
          return fn_test_1
  
      tb = TensorBoard()
      state = {
          torchbearer.METRICS: {
              "test": 1,
              "test2": [1, 2, 3],
              "test3": [[1], [2], [3, 4]],
          }
      }
      tb.add_metric(
          fn_test(NotImplementedError, [list]),
          "single",
          state[torchbearer.METRICS]["test2"],
      )
  
      self.assertTrue(mock_fn.call_args_list[0][0] == ("single_0", 1))
      self.assertTrue(mock_fn.call_args_list[1][0] == ("single_1", 2))
      self.assertTrue(mock_fn.call_args_list[2][0] == ("single_2", 3))
  
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 2 for calling the TestTensorBoard obj's underlying member method code with example usage: obj.test_add_metric_list(_, __, writer) and returns: fn_test_1