code: def _test_ddp_gather_uneven_tensors_multidim_nccl() -> None:
      rank = dist.get_rank()
      world_size = dist.get_world_size()
      tensor = torch.ones(
          rank + 1, 4 - rank, device=get_device_from_env()
      )
      result = all_gather_tensors(tensor)
      assert len(result) == world_size
      for idx in range(world_size):
          val = result[idx]
          assert val.shape == (idx + 1, 4 - idx)
          assert (val == 1).all()
  
file_path: tnt/tests/utils/test_distributed_gpu.py
imports: import unittest
  import torch
  import torch.distributed
  from torchtnt.utils.device import get_device_from_env
  from torchtnt.utils.distributed import all_gather_tensors, get_local_rank, PGWrapper
  from torchtnt.utils.env import init_from_env
  from torchtnt.utils.test_utils import skip_if_not_distributed, skip_if_not_gpu, spawn_multi_process
label_desc: Use image node_id 2 for calling the DistributedGPUTest obj's underlying member method code with example usage: obj._test_ddp_gather_uneven_tensors_multidim_nccl() without return types