code: def test_train(self):
      self._metric.train()
      calls = []
      for i in range(len(self._states)):
          self._metric.process(self._states[i])
          calls.append(
              call(
                  self._states[i][torchbearer.Y_PRED].data,
                  self._states[i][torchbearer.Y_TRUE].data,
              )
          )
      self._metric_function.assert_has_calls(calls)
  
imports: import unittest
  import torch
  from mock import Mock, call
  from torch.autograd import Variable
  import torchbearer
  from torchbearer.metrics import Metric, BatchLambda, EpochLambda, ToDict
label_desc: Use image node_id 2 for calling the TestBatchLambda obj's underlying member method code with example usage: obj.test_train() without return types