code: def __init__(
      self, has_wrapping, sharding_strategy, mixed_precision=None
  ):
      # to ensure determinism
      torch.manual_seed(0)
      torch.cuda.manual_seed(0)
      super().__init__()
  
      if has_wrapping:
          self.net = FSDP(
              nn.Sequential(
                  nn.Linear(8, 16),
                  nn.ReLU(),
                  FSDP(
                      nn.Linear(16, 8),
                      device_id=torch.cuda.current_device(),
                      sharding_strategy=sharding_strategy,
                      mixed_precision=mixed_precision,
                  ),
              ),
              device_id=torch.cuda.current_device(),
              sharding_strategy=sharding_strategy,
              mixed_precision=mixed_precision,
          )
      else:
          self.net = nn.Sequential(
              nn.Linear(8, 16), nn.ReLU(), nn.Linear(16, 8)
          )
  
      self.out = nn.Linear(8, 4)
  
imports: import sys
  from typing import Optional
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import distributed
  from torch.distributed.algorithms._comm_hooks import default_hooks
  from torch.distributed.distributed_c10d import _get_default_group
  from torch.distributed.fsdp import FullyShardedDataParallel, MixedPrecision
  from torch.distributed.fsdp.fully_sharded_data_parallel import ShardingStrategy
  from torch.distributed.fsdp.wrap import ModuleWrapPolicy
  from torch.testing._internal.common_distributed import requires_nccl, requires_nccl_version, skip_but_pass_in_sandcastle_if, skip_if_lt_x_gpu
  from torch.testing._internal.common_fsdp import FSDPTest
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, parametrize, run_tests
label_desc: Use image node_id 1 to create a new Net object from inherited base classes: nn with example: obj = Net(has_wrapping, sharding_strategy, mixed_precision)