code: def test_save_and_load_checkpoint(self):
      checkpoint_dict = {str(i): i * 2 for i in range(1000)}
  
      # save to the default checkpoint file
      save_checkpoint(self.base_dir, checkpoint_dict)
  
      # load the checkpoint by using the default file
      loaded_checkpoint = load_checkpoint(self.base_dir)
      self.assertDictEqual(checkpoint_dict, loaded_checkpoint)
  
      # load the checkpoint by passing the full path
      checkpoint_path = f"{self.base_dir}/{CHECKPOINT_FILE}"
      loaded_checkpoint = load_checkpoint(checkpoint_path)
      self.assertDictEqual(checkpoint_dict, loaded_checkpoint)
  
      # create a new checkpoint dict
      filename = "my_checkpoint.torch"
      checkpoint_dict = {str(i): i * 3 for i in range(1000)}
  
      # save the checkpoint to a different file
      save_checkpoint(
          self.base_dir, checkpoint_dict, checkpoint_file=filename
      )
  
      # load the checkpoint by passing the full path
      checkpoint_path = f"{self.base_dir}/{filename}"
      loaded_checkpoint = load_checkpoint(checkpoint_path)
      self.assertDictEqual(checkpoint_dict, loaded_checkpoint)
  
imports: import copy
  import shutil
  import tempfile
  import unittest
  import unittest.mock
  from pathlib import Path
  import classy_vision.generic.util
  import torch
  import torch.nn
  from classy_vision.generic.util import CHECKPOINT_FILE, get_torch_version, load_checkpoint, save_checkpoint, split_batchnorm_params, Timer, update_classy_model, update_classy_state
  from classy_vision.models import build_model
  from classy_vision.tasks import build_task
  from classy_vision.trainer import LocalTrainer
  from test.generic.config_utils import get_fast_test_task_config, get_test_model_configs
  from test.generic.utils import compare_model_state, compare_states
label_desc: Use image node_id 3 for calling the TestCheckpointFunctions obj's underlying member method code with example usage: obj.test_save_and_load_checkpoint() without return types