code: def test_on_val(self):
      if sys.version_info[0] >= 3:
          callback = PyCM().on_val()
          state = {
              torchbearer.METRIC_LIST: None,
              torchbearer.DATA: torchbearer.VALIDATION_DATA,
          }
          callback.on_start_validation(state)
          self.assertTrue(state[torchbearer.METRIC_LIST] is not None)
  
imports: import sys
  from unittest import TestCase
  from mock import MagicMock, patch, ANY
  import torchbearer
  from torchbearer.callbacks import PyCM
  import matplotlib.pyplot
label_desc: Use image node_id 4 for calling the TestPyCM obj's underlying member method code with example usage: obj.test_on_val() without return types