code: def __next__(self):
      if self.__signal_received is not None:
          logger.log("\nKilling Loop.", Text.danger)
          monit.finish_loop()
          self.__finish()
          raise StopIteration("SIGINT")
  
      try:
          global_step = next(self.__loop)
      except StopIteration as e:
          self.__finish()
          raise e
  
      tracker.set_global_step(global_step)
  
      if (
          global_step - self.__last_write_step
          >= self.__log_write_interval
      ):
          tracker.save()
          self.__last_write_step = global_step
      if (
          global_step - self.__last_new_line_step
          >= self.__log_new_line_interval
      ):
          tracker.new_line()
          self.__last_new_line_step = global_step
      # if self.is_interval(self.__log_write_interval, global_step):
      #     tracker.save()
      # if self.is_interval(self.__log_new_line_interval, global_step):
      #     logger.log()
  
      # if (self.__is_save_models and
      #         self.is_interval(self.__save_models_interval, global_step)):
      #     experiment.save_checkpoint()
      if (
          self.__is_save_models
          and global_step - self.__last_save_step
          >= self.__save_models_interval
      ):
          experiment.save_checkpoint()
          self.__last_save_step = global_step
  
      return global_step
  
imports: import signal
  import typing
  from typing import Optional, Tuple, Any, Collection
  from labml import tracker, logger, experiment, monit
  from labml.configs import BaseConfigs, meta_config, option
  from labml.internal.monitor import Loop
  from labml.logger import Text
label_desc: Use image node_id 5 for calling the TrainingLoop obj's underlying member method code with example usage: obj.__next__() and returns: global_step