code: def test_lazy_load_mixed_state(tmp_path):
      model0 = nn.Linear(2, 2)
      optim0 = torch.optim.Adam(model0.parameters())
      checkpoint = {
          "int": 1,
          "dict": {"a": 1, "b": 2},
          "list": [1, 2, 3],
          "pickled_model": model0,
          "model": model0.state_dict(),
          "optimizer": optim0.state_dict(),
      }
      torch.save(checkpoint, tmp_path / "checkpoint.pt")
  
      model1 = nn.Linear(2, 2)
      optim1 = torch.optim.Adam(model0.parameters())
      loaded_checkpoint = _lazy_load(tmp_path / "checkpoint.pt")
      model1.load_state_dict(loaded_checkpoint["model"])
      optim1.load_state_dict(loaded_checkpoint["optimizer"])
  
file_path: pytorch-lightning/tests/tests_fabric/utilities/test_load.py
imports: import pytest
  import torch
  import torch.nn
  from lightning.fabric.utilities.load import _lazy_load, _materialize_tensors, _move_state_into, _NotYetLoadedTensor
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 3 for calling a global function with example usage: test_lazy_load_mixed_state(tmp_path) without return types