code: def setUp(self):
      import argparse
  
      torch.manual_seed(1234)
      # An easy way to get a AttributeDict object
      self.trainer = argparse.Namespace()
      self.config = load_yaml(os.path.join("configs", "defaults.yaml"))
      self.config = OmegaConf.merge(
          self.config,
          {
              "model": "simple",
              "model_config": {},
              "checkpoint": {
                  "save_git_details": False,
                  "reset": {
                      "optimizer": False,
                      "counts": False,
                      "all": False,
                      "fp16_scaler": False,
                  },
                  "pretrained_state_mapping": {"base_test": "base"},
                  "max_to_keep": 5,
              },
              "config_override": None,
              "training": {
                  "checkpoint_interval": 1,
                  "early_stop": {
                      "criteria": "val/total_loss",
                      "minimize": True,
                  },
                  "lr_scheduler": True,
              },
              "scheduler": {
                  "type": "multi_step",
                  "params": {
                      "use_warmup": False,
                      "lr_steps": [10, 20],
                      "lr_ratio": 0.1,
                      "warmup_factor": 1.0,
                  },
              },
          },
      )
      # Keep original copy for testing purposes
      self.trainer.config = deepcopy(self.config)
  
      self.trainer.model = SimpleModule()
      self.trainer.scaler = torch.cuda.amp.GradScaler()
  
      self.trainer.optimizer = torch.optim.Adam(
          self.trainer.model.parameters(), lr=1e-01
      )
  
      self.trainer.lr_scheduler_callback = LRSchedulerCallback(
          self.config, self.trainer
      )
  
imports: import contextlib
  import os
  import tempfile
  import unittest
  from copy import deepcopy
  from io import StringIO
  from unittest.mock import Mock, patch
  import torch
  from mmf.common.registry import registry
  from mmf.models.base_model import BaseModel
  from mmf.trainers.callbacks.checkpoint import CheckpointCallback
  from mmf.trainers.callbacks.early_stopping import EarlyStoppingCallback
  from mmf.trainers.callbacks.lr_scheduler import LRSchedulerCallback
  from mmf.utils.checkpoint import Checkpoint
  from mmf.utils.configuration import load_yaml
  from mmf.utils.file_io import PathManager
  from omegaconf import OmegaConf
  from tests.test_utils import compare_state_dicts, skip_if_no_cuda
label_desc: Use image node_id 1 for calling the TestUtilsCheckpoint obj's underlying member method code with example usage: obj.setUp() without return types