code: def _get_ckpt_config(
      self,
      is_pl=False,
      ckpt_config=None,
      max_steps=6,
      resume_from_checkpoint=None,
  ):
      if ckpt_config is None:
          ckpt_config = {}
  
      if not is_pl:
          return get_config_with_defaults(
              {
                  "training": {
                      "max_updates": max_steps,
                      "max_epochs": None,
                      "early_stop": {
                          "enabled": True,
                          "criteria": "numbers/accuracy",
                          "minimize": False,
                      },
                      "checkpoint_interval": 2,
                      "evaluation_interval": 2,
                  },
                  "model": "simple_model",
                  "evaluation": {"metrics": ["accuracy"]},
                  "checkpoint": {
                      "max_to_keep": 1,
                      "save_git_details": False,
                      **ckpt_config,
                  },
                  "run_type": "train_val",
              }
          )
      else:
          return get_config_with_defaults(
              {
                  "training": {
                      "checkpoint_interval": 2,
                      "early_stop": {
                          "enabled": True,
                          "criteria": "numbers/accuracy",
                          "minimize": False,
                      },
                  },
                  "trainer": {
                      "params": {
                          "max_steps": max_steps,
                          "max_epochs": None,
                          "enable_checkpointing": True,
                          "resume_from_checkpoint": resume_from_checkpoint,
                          "val_check_interval": 2,
                      }
                  },
                  "model": "simple_lightning_model",
                  "evaluation": {"metrics": ["accuracy"]},
                  "checkpoint": {
                      "max_to_keep": 1,
                      "save_git_details": False,
                      **ckpt_config,
                  },
                  "run_type": "train_val",
              }
          )
  
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 3 for calling the TestLightningCheckpoint obj's underlying member method code with example usage: obj._get_ckpt_config(is_pl, ckpt_config, max_steps, resume_from_checkpoint) and returns: get_config_with_defaults, get_config_with_defaults