code: def __init__(
      self,
      *,
      loop_count: int,
      loop_step: Optional[int],
      is_save_models: bool,
      log_new_line_interval: int,
      log_write_interval: int,
      save_models_interval: int,
      is_loop_on_interrupt: bool,
  ):
      self.__loop_count = loop_count
      self.__loop_step = loop_step
      self.__is_save_models = is_save_models
      self.__log_new_line_interval = log_new_line_interval
      self.__log_write_interval = log_write_interval
      self.__last_write_step = 0
      self.__last_new_line_step = 0
      self.__save_models_interval = save_models_interval
      self.__last_save_step = 0
      self.__signal_received = None
      self.__is_loop_on_interrupt = is_loop_on_interrupt
      self._iter = None
  
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 1 to create a new TrainingLoop object  with example: obj = TrainingLoop()