code: def test_partial_under_load(self):
      net1 = torch.nn.Sequential(*[torch.nn.PReLU(), torch.nn.PReLU()])
      data1 = net1.state_dict()
      data1["0.weight"] = torch.tensor([0.1])
      data1["1.weight"] = torch.tensor([0.2])
      net1.load_state_dict(data1)
  
      net2 = torch.nn.Sequential(*[torch.nn.PReLU()])
      data2 = net2.state_dict()
      data2["0.weight"] = torch.tensor([0.3])
      net2.load_state_dict(data2)
  
      with tempfile.TemporaryDirectory() as tempdir:
          engine = Engine(lambda e, b: None)
          CheckpointSaver(
              save_dir=tempdir, save_dict={"net": net1}, save_final=True
          ).attach(engine)
          engine.run([0] * 8, max_epochs=5)
          path = tempdir + "/net_final_iteration=40.pt"
          engine = Engine(lambda e, b: None)
          CheckpointLoader(
              load_path=path, load_dict={"net": net2}, strict=False
          ).attach(engine)
          engine.run([0] * 8, max_epochs=1)
          assert_allclose(
              net2.state_dict()["0.weight"].cpu(), torch.tensor([0.1])
          )
  
file_path: MONAI/tests/test_handler_checkpoint_loader.py
imports: from __future__ import annotations
  import tempfile
  import unittest
  import torch
  import torch.optim
  from ignite.engine import Engine, Events
  from monai.handlers import CheckpointLoader, CheckpointSaver
  from tests.utils import assert_allclose
label_desc: Use image node_id 4 for calling the TestHandlerCheckpointLoader obj's underlying member method code with example usage: obj.test_partial_under_load() without return types