code: def _get_lightning_trainer(
      self,
      ckpt_config=None,
      model_config=None,
      seed=2,
      max_steps=6,
      resume_from_checkpoint=None,
  ):
      config = self._get_ckpt_config(
          ckpt_config=ckpt_config,
          max_steps=max_steps,
          is_pl=True,
          resume_from_checkpoint=resume_from_checkpoint,
      )
  
      load_model_from_config = False
      if model_config:
          config.model_config = model_config
          config.model = list(model_config.keys())[0]
          load_model_from_config = True
  
      lightning = get_lightning_trainer(
          config=config,
          prepare_trainer=False,
          load_model_from_config=load_model_from_config,
          seed=seed,
      )
      callback = LightningLoopCallback(lightning)
      lightning.callbacks.append(callback)
      lightning.callbacks += lightning.configure_checkpoint_callbacks()
      lightning.callbacks += lightning.configure_monitor_callbacks()
      prepare_lightning_trainer(lightning)
      return lightning
  
imports: import contextlib
  import os
  import tempfile
  import unittest
  from unittest.mock import patch
  import torch
  from mmf.trainers.callbacks.checkpoint import CheckpointCallback
  from mmf.trainers.callbacks.early_stopping import EarlyStoppingCallback
  from mmf.trainers.lightning_core.loop_callback import LightningLoopCallback
  from mmf.utils.checkpoint import get_ckpt_path_from_folder
  from mmf.utils.download import download_pretrained_model
  from tests.test_utils import skip_if_no_network
  from tests.trainers.test_utils import get_config_with_defaults, get_lightning_trainer, get_mmf_trainer, prepare_lightning_trainer
label_desc: Use image node_id 5 for calling the TestLightningCheckpoint obj's underlying member method code with example usage: obj._get_lightning_trainer(ckpt_config, model_config, seed, max_steps, resume_from_checkpoint) and returns: lightning