code: def on_train_batch_end(
      self,
      trainer,
      pl_module,
      outputs,
      batch,
      batch_idx,
      dataloader_idx,
  ):
      report = Report(outputs["input_batch"], outputs)
      self.lightning_losses.append(report["losses"]["loss"].item())
  
file_path: mmf/tests/trainers/lightning/test_loss.py
imports: import unittest
  from unittest.mock import MagicMock, patch
  from mmf.common.report import Report
  from pytorch_lightning.callbacks.base import Callback
  from tests.trainers.test_utils import get_config_with_defaults, get_lightning_trainer, get_mmf_trainer
label_desc: Use image node_id 3 for calling the TestLightningTrainerLoss obj's underlying member method code with example usage: obj.on_train_batch_end(trainer, pl_module, outputs, batch, batch_idx, dataloader_idx) without return types