code: def test_load_lazy_linear(dim1, dim2, bias, device):
      lin1 = Linear(dim1, 32, bias=bias).to(device)
      lin2 = Linear(dim2, 32, bias=bias).to(device)
      lin2.load_state_dict(lin1.state_dict())
  
      if dim1 != -1:
          assert isinstance(lin1.weight, torch.nn.Parameter)
          assert isinstance(lin2.weight, torch.nn.Parameter)
          assert torch.allclose(lin1.weight, lin2.weight)
          assert not hasattr(lin1, "_hook")
          assert not hasattr(lin2, "_hook")
      else:
          assert isinstance(lin1.weight, UninitializedParameter)
          assert isinstance(lin2.weight, UninitializedParameter)
          assert hasattr(lin1, "_hook")
          assert hasattr(lin2, "_hook")
  
      if bias:
          assert isinstance(lin1.bias, torch.nn.Parameter)
          assert isinstance(lin2.bias, torch.nn.Parameter)
          if (
              dim1 != -1
          ):  # Only check for equality on materialized bias:
              assert torch.allclose(lin1.bias, lin2.bias)
      else:
          assert lin1.bias is None
          assert lin2.bias is None
  
      with pytest.raises(RuntimeError, match="in state_dict"):
          lin1.load_state_dict({}, strict=True)
      lin1.load_state_dict({}, strict=False)
  
imports: import copy
  import warnings
  from typing import List
  import pytest
  import torch
  from torch import Tensor
  from torch.nn import Linear
  from torch.nn.parameter import UninitializedParameter
  import torch_geometric.backend
  from torch_geometric.nn import HeteroDictLinear, HeteroLinear, Linear
  from torch_geometric.profile import benchmark
  from torch_geometric.testing import withCUDA, withPackage
  from torch_geometric.typing import pyg_lib
  from torch_geometric.utils import cumsum
label_desc: Use image node_id 3 for calling a global function with example usage: test_load_lazy_linear(dim1, dim2, bias, device) without return types