code: def test_all_gather_ddp_spawn():
      spawn_launch(all_gather_ddp_spawn_fn, [torch.device("cpu")] * 3)
  
file_path: pytorch-lightning/tests/tests_pytorch/utilities/test_all_gather_grad.py
imports: import numpy
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from tests_pytorch.core.test_results import spawn_launch
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 2 for calling a global function with example usage: test_all_gather_ddp_spawn() without return types