code: def test_on_val(self):
      bcplus = BCPlus(classes=4)
      state = {torchbearer.TARGET: torch.tensor([1, 3, 2])}
      bcplus.on_sample_validation(state)
      self.assertTrue(
          (
              state[torchbearer.TARGET]
              - torch.tensor(
                  [[0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]]
              ).float()
          )
          .abs()
          .lt(1e-4)
          .all()
      )
  
      bcplus = BCPlus(classes=4)
      state = {
          torchbearer.TARGET: torch.tensor(
              [[0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]]
          )
      }
      bcplus.on_sample_validation(state)
      self.assertTrue(
          (
              state[torchbearer.TARGET]
              - torch.tensor(
                  [[0, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]]
              ).float()
          )
          .abs()
          .lt(1e-4)
          .all()
      )
  
file_path: torchbearer/tests/callbacks/test_between_class.py
imports: from unittest import TestCase
  import torch
  import torchbearer
  from torchbearer.callbacks import BCPlus
label_desc: Use image node_id 1 for calling the TestBCPlus obj's underlying member method code with example usage: obj.test_on_val() without return types