code: def _train_log(self, trainer: Trainer, pl_module: LightningModule):
      self.train_combined_report = self.train_combined_report.detach()
      if self.training_config.evaluate_metrics:
          self.train_combined_report.metrics = pl_module.metrics(
              self.train_combined_report, self.train_combined_report
          )
  
      pl_module.train_meter.update_from_report(
          self.train_combined_report
      )
  
      extra = {}
      if "cuda" in str(trainer.model.device):
          extra["max mem"] = torch.cuda.max_memory_allocated() / 1024
          extra["max mem"] //= 1024
  
      if self.training_config.experiment_name:
          extra["experiment"] = self.training_config.experiment_name
  
      optimizer = self.get_optimizer(trainer)
      num_updates = self._get_num_updates_for_logging(trainer)
      current_iteration = self._get_iterations_for_logging(trainer)
      extra.update(
          {
              "epoch": self._get_current_epoch_for_logging(trainer),
              "iterations": current_iteration,
              "num_updates": num_updates,
              "max_updates": trainer.max_steps,
              "lr": "{:.5f}".format(
                  optimizer.param_groups[0]["lr"]
              ).rstrip("0"),
              "ups": "{:.2f}".format(
                  self.trainer_config.log_every_n_steps
                  / self.train_timer.unix_time_since_start()
              ),
              "time": self.train_timer.get_time_since_start(),
              "time_since_start": self.total_timer.get_time_since_start(),
              "eta": calculate_time_left(
                  max_updates=trainer.max_steps,
                  num_updates=num_updates,
                  timer=self.train_timer,
                  num_snapshot_iterations=self.snapshot_iterations,
                  log_interval=self.trainer_config.log_every_n_steps,
                  eval_interval=self.trainer_config.val_check_interval,
              ),
          }
      )
      self.train_timer.reset()
      summarize_report(
          current_iteration=current_iteration,
          num_updates=num_updates,
          max_updates=trainer.max_steps,
          meter=pl_module.train_meter,
          extra=extra,
          tb_writer=self.lightning_trainer.tb_writer,
      )
  
imports: import logging
  from typing import Any, Dict, List
  import torch
  from mmf.common.meter import Meter
  from mmf.common.registry import registry
  from mmf.common.report import Report
  from mmf.common.sample import SampleList
  from mmf.utils.logger import calculate_time_left, summarize_report
  from mmf.utils.timer import Timer
  from pytorch_lightning import LightningModule, Trainer
  from pytorch_lightning.callbacks.base import Callback
label_desc: Use image node_id 12 for calling the LightningLoopCallback obj's underlying member method code with example usage: obj._train_log(trainer, pl_module) without return types