code: def test_sample_targets(self):
      # Test mixup
      bcplus = BCPlus(classes=4, mixup_loss=True)
      state = {
          torchbearer.INPUT: torch.zeros(3, 10, 10),
          torchbearer.TARGET: torch.tensor([1, 3, 2]),
          torchbearer.DEVICE: "cpu",
      }
      bcplus.on_sample(state)
  
      self.assertTrue(torchbearer.MIXUP_LAMBDA in state)
      self.assertTrue(torchbearer.MIXUP_PERMUTATION in state)
      self.assertTrue(len(state[torchbearer.TARGET]) == 2)
  
      # Test bcplus
      bcplus = BCPlus(classes=4)
      state = {
          torchbearer.INPUT: torch.zeros(3, 10, 10),
          torchbearer.TARGET: torch.tensor([1, 3, 2]),
          torchbearer.DEVICE: "cpu",
      }
      bcplus.on_sample(state)
  
      self.assertTrue(state[torchbearer.TARGET].dim() == 2)
      self.assertTrue(not (torchbearer.MIXUP_PERMUTATION in state))
  
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 3 for calling the TestBCPlus obj's underlying member method code with example usage: obj.test_sample_targets() without return types