code: def _get_mmf_ckpt(self, filename, ckpt_config=None):
      with mock_env_with_temp(
          "mmf.utils.checkpoint.get_mmf_env"
      ) as tmp_d, mock_env_with_temp(
          "mmf.common.test_reporter.get_mmf_env"
      ) as _:
          # generate checkpoint
          self._get_mmf_trainer(max_updates=6).training_loop()
  
          # load the generated checkpoint, calling on_init_start is
          # necessary to load the checkpoint
          mmf_trainer = self._get_mmf_trainer(
              ckpt_config=ckpt_config, max_updates=0, seed=1
          )
          mmf_trainer.on_init_start()
  
          mmf_ckpt_current = torch.load(os.path.join(tmp_d, filename))
          self._assert_same_dict(
              mmf_ckpt_current["model"], mmf_trainer.model.state_dict()
          )
      return mmf_ckpt_current
  
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 12 for calling the TestLightningCheckpoint obj's underlying member method code with example usage: obj._get_mmf_ckpt(filename, ckpt_config) and returns: mmf_ckpt_current