code: def test_p2p():
      world_size = 4
      spawn(run_check, world_size)
  
file_path: colossalai/tests/test_legacy/test_trainer/test_pipeline/test_p2p.py
imports: import pytest
  import torch
  import torch.distributed
  from colossalai.legacy.communication import recv_backward, recv_forward, send_backward, send_backward_recv_forward, send_forward, send_forward_recv_backward
  from colossalai.legacy.context.parallel_mode import ParallelMode
  from colossalai.legacy.core import global_context
  from colossalai.legacy.initialize import launch
  from colossalai.logging import get_dist_logger
  from colossalai.testing import rerun_if_address_is_in_use, spawn
  from colossalai.utils import get_current_device
label_desc: Use image node_id 7 for calling a global function with example usage: test_p2p() without return types