class_docstr: Base class for a trainer.
      
code: def __new__(cls, *args, **kwargs):
      if (
          len(args) > 0 and isinstance(args[0], TrainConfig)
      ) or "config" in kwargs:
          logger.error(
              "You're calling new trainers with old trainer API!"
          )
          logger.error(
              "See https://github.com/tensorpack/tensorpack/issues/458 for more information."
          )
          import sys
  
          sys.exit(1)
      else:
          return super(Trainer, cls).__new__(cls)
  
imports: import copy
  import time
  import weakref
  import tensorflow
  from ..compat import tfv1
  from ..callbacks import Callback, Callbacks, Monitors, MonitorBase
  from ..callbacks.steps import MaintainStepCounter
  from ..tfutils import get_global_step_value
  from ..tfutils.model_utils import describe_trainable_vars
  from ..tfutils.sesscreate import NewSessionCreator, ReuseSessionCreator
  from ..tfutils.sessinit import JustCurrentSession, SessionInit
  from ..utils import logger
  from ..utils.argtools import call_only_once
  from ..utils.utils import humanize_time_delta
  from .config import DEFAULT_CALLBACKS, DEFAULT_MONITORS, TrainConfig
label_desc: Use image node_id 10 for calling the Trainer obj's underlying member method code with example usage: obj.__new__(cls) and returns: super