code: def on_start_training(func):
      """The :func:`on_start_training` decorator is used to initialise a :class:`.Callback` with :meth:`~.Callback.on_start_training`
      calling the decorated function
  
      Example: ::
  
          >>> from torchbearer import Trial
          >>> from torchbearer.callbacks import on_start_training
  
          # Example callback running at start of the training pass
          >>> @on_start_training
          ... def print_callback(state):
          ...     print('Starting training.')
  
          >>> trial = Trial(None, callbacks=[print_callback]).for_steps(1).run()
          Starting training.
  
      Args:
          func (function): The function(state) to *decorate*
  
      Returns:
          Callback: Initialised callback with :meth:`~.Callback.on_start_training` calling func
      """
      return bind_to(Callback.on_start_training)(func)
  
imports: import sys
  import types
  import torchbearer
  from torchbearer.callbacks import Callback
label_desc: Use image node_id 5 for calling a global function with example usage: on_start_training(func) and returns: bind_to