code: def __init__(self):
      super().__init__()
      self.seq1 = nn.Sequential(*[nn.Linear(10, 10) for _ in range(2)])
      self.seq2 = nn.Sequential(*[nn.Linear(10, 10) for _ in range(2)])
      self.p = nn.Parameter(torch.randn(10, 10), requires_grad=True)
      self.b = torch.zeros(1)
  
file_path: pytorch/test/distributed/_composable/test_contract.py
imports: from copy import deepcopy
  from typing import Tuple
  import torch
  import torch.nn
  from torch.distributed._composable import _get_registry, contract
  from torch.testing._internal.common_utils import run_tests, skipIfTorchDynamo, TestCase
label_desc: Use image node_id 1 to create a new ToyModel object from inherited base classes: nn with example: obj = ToyModel()