code: def once(fcn):
      """
      Decorator to fire a callback once in the lifetime of the callback. If the callback is a class method, each
      instance of the class will fire only once. For functions, only the first instance will fire (even if more than
      one function is present in the callback list).
  
      Example: ::
  
          >>> import torchbearer
          >>> from torchbearer import Trial
          >>> from torchbearer.callbacks import once, on_step_training
  
          # Example callback to be called exactly once on the very first training step
          >>> @once
          ... @on_step_training
          ... def print_callback(state):
          ...     print('This happens once ever')
  
          >>> trial = Trial(None, callbacks=[print_callback]).for_steps(1).run()
          This happens once ever
  
      Args:
          fcn (function): the `torchbearer callback` function to decorate.
  
      Returns:
          the decorator
      """
  
      def _once(self, _):
          try:
              return not self.__done__
          except AttributeError:
              self.__done__ = True
              return True
  
      return only_if(_once)(fcn)
  
imports: import sys
  import types
  import torchbearer
  from torchbearer.callbacks import Callback
label_desc: Use image node_id 22 for calling a global function with example usage: once(fcn) and returns: only_if, unknown, True