code: def test_threshold(self):
      state = {
          torchbearer.Y_TRUE: torch.FloatTensor(
              [
                  [0.9, 0, 0],
                  [0, 1, 0],
                  [0, 0, 1],
                  [0, 0.3, 1],
                  [0, 0.6, 0],
              ]
          ),
          torchbearer.Y_PRED: torch.FloatTensor(
              [
                  [0.9, 0.1, 0.1],  # Correct
                  [0.1, 0.9, 0.1],  # Correct
                  [0.1, 0.1, 0.9],  # Correct
                  [0.9, 0.1, 0.1],  # Incorrect
                  [0.9, 0.1, 0.1],  # Incorrect
              ]
          ),
      }
  
      metric = BinaryAccuracy(
          threshold=0.4
      ).root  # Get root node of Tree for testing
      metric.train()
      result = metric.process(state)
      for i in range(0, len(self._targets)):
          self.assertEqual(
              result[i],
              self._targets[i],
              msg="returned: "
              + str(result[i])
              + " expected: "
              + str(self._targets[i])
              + " in: "
              + str(result),
          )
  
imports: import unittest
  import torch
  from torch.autograd import Variable
  import torchbearer
  from torchbearer.metrics import Loss, Epoch, CategoricalAccuracy, TopKCategoricalAccuracy, BinaryAccuracy, MeanSquaredError
label_desc: Use image node_id 5 for calling the TestBinaryAccuracy obj's underlying member method code with example usage: obj.test_threshold() without return types