code: def check_layer(rank, world_size, port):
      disable_existing_loggers()
      launch(
          config=CONFIG,
          rank=rank,
          world_size=world_size,
          host="localhost",
          port=port,
          backend="nccl",
      )
  
      disable_existing_loggers()
      # check_send_recv_forward()
      check_small_pipeline()
  
      gpc.destroy()
      torch.cuda.empty_cache()
  
file_path: colossalai/tests/test_legacy/test_comm/test_object_list_p2p_v2.py
imports: import pytest
  import torch
  from colossalai.legacy.communication.p2p_v2 import recv_backward, recv_forward, send_backward, send_forward
  from colossalai.legacy.context import ParallelMode
  from colossalai.legacy.core import global_context
  from colossalai.legacy.initialize import launch
  from colossalai.logging import disable_existing_loggers
  from colossalai.testing import rerun_if_address_is_in_use, spawn
label_desc: Use image node_id 4 for calling a global function with example usage: check_layer(rank, world_size, port) without return types