code: def on_sample(self, state):
      if (
          not self._newstyle
          and self._step_on_batch
          and self._monitor is None
      ):
          self._step(state)
  
imports: import functools
  import warnings
  import torch
  import torchbearer
  from torchbearer.bases import get_metric, _pytorch_version_lt, _pytorch_version_gt
  from torchbearer.callbacks import Callback
label_desc: Use image node_id 4 for calling the TorchScheduler obj's underlying member method code with example usage: obj.on_sample(state) without return types