code: def __init__(self, **kwargs):
      unknown_keys = (
          kwargs.keys() - TrainingState.__annotations__.keys()
      )
      if unknown_keys:
          raise TypeError(
              f"TrainingState unexpected attributes {unknown_keys}"
          )
      vars(self).update(kwargs)
  
file_path: pytext/pytext/trainers/training_state.py
imports: from typing import Any, Dict
  from pytext.common.constants import Stage
  from pytext.data.tensorizers import Tensorizer
  from pytext.models.model import Model
  from pytext.optimizer import Optimizer
  from pytext.optimizer.scheduler import Scheduler
  from pytext.optimizer.sparsifiers.sparsifier import Sparsifier
label_desc: Use image node_id 1 to create a new TrainingState object  with example: obj = TrainingState()