code: def test1(precision, flatten):
      if torch_version() < (1, 6, 0):
          pytest.skip("older pytorch doesn't support reduce_scatter")
  
      temp_file_name = tempfile.mkstemp()[1]
      unused = tempfile.mkstemp()[1]
  
      fsdp_config = {}
      fsdp_config["mixed_precision"] = precision == "mixed"
      fsdp_config["flatten_parameters"] = flatten == "flatten"
  
      # Some bugs only show up when we are in world_size > 1 due to sharding changing
      # the tensor dimensions.
      world_size = 2
      mp.spawn(
          _test_func,
          args=(world_size, fsdp_config, temp_file_name, unused),
          nprocs=world_size,
          join=True,
      )
  
file_path: fairscale/tests/nn/data_parallel/test_fsdp_multiple_forward.py
imports: import tempfile
  import pytest
  import torch
  import torch.multiprocessing
  from torch.nn import Linear, Module
  from torch.optim import SGD
  from fairscale.fair_dev.testing.testing import dist_init, skip_if_single_gpu, teardown
  from fairscale.internal import torch_version
  from fairscale.nn.data_parallel import FullyShardedDataParallel
  from fairscale.nn.data_parallel import TrainingState
label_desc: Use image node_id 2 for calling a global function with example usage: test1(precision, flatten) without return types