code: def on_train_step_end(
      self,
      state: State,
      data: Batch,
      step: int,
      results: TrainStepResults,
  ) -> None:
      loss = results.loss
      if step % self.log_every_n_steps == 0:
          self.tb_logger.log("loss", loss, step)
  
imports: import argparse
  import logging
  import tempfile
  from argparse import Namespace
  from typing import Optional, Tuple
  import torch
  from libfb.py import parutil
  from torch.utils.data import random_split
  from torch.utils.data.dataset import Dataset, Subset
  from torchtnt.examples.mingpt.char_dataset import CharDataset, DataConfig
  from torchtnt.examples.mingpt.model import create_optimizer, GPT, GPTConfig, OptimizerConfig
  from torchtnt.framework.auto_unit import AutoUnit, TrainStepResults
  from torchtnt.framework.fit import fit
  from torchtnt.framework.state import State
  from torchtnt.utils import init_from_env, seed, TLRScheduler
  from torchtnt.utils.loggers import TensorBoardLogger
label_desc: Use image node_id 4 for calling the MinGPTUnit obj's underlying member method code with example usage: obj.on_train_step_end(state, data, step, results) without return types