code: def test_compatibility_with_ddp():
      spawn(check_compatibility_with_ddp, 4)
  
file_path: ColossalAI/tests/test_auto_parallel/test_tensor_shard/test_compatibility_with_ddp.py
imports: import copy
  import pytest
  import torch
  from torch.nn.parallel import DistributedDataParallel
  from colossalai.device.device_mesh import DeviceMesh
  from colossalai.initialize import launch
  from colossalai.logging import disable_existing_loggers
  from colossalai.testing import assert_close, rerun_if_address_is_in_use, run_on_environment_flag, spawn
label_desc: Use image node_id 2 for calling a global function with example usage: test_compatibility_with_ddp() without return types