code: def _run(self):
      if hvd.rank() == 0:
          data1 = torch.tensor([[1, 2], [3, 4]])
          data2 = torch.tensor([[1.0, 2.0]])
          data3 = torch.tensor(7)
  
      if hvd.rank() == 1:
          data1 = torch.tensor([[5, 6]])
          data2 = torch.tensor([[3.0, 4.0], [5.0, 6.0]])
          data3 = torch.tensor(8)
  
      result1 = evenly_divisible_all_gather(data=data1, concat=True)
      assert_allclose(result1, torch.tensor([[1, 2], [3, 4], [5, 6]]))
      result2 = evenly_divisible_all_gather(data=data2, concat=False)
      for r, e in zip(
          result2,
          [
              torch.tensor([[1.0, 2.0]]),
              torch.tensor([[3.0, 4.0], [5.0, 6.0]]),
          ],
      ):
          assert_allclose(r, e)
      result3 = evenly_divisible_all_gather(data=data3, concat=False)
      for r in result3:
          assert_allclose(r.ndimension(), 0)
  
file_path: MONAI/tests/hvd_evenly_divisible_all_gather.py
imports: from __future__ import annotations
  import torch
  from monai.utils import evenly_divisible_all_gather
  from monai.utils.module import optional_import
  from tests.utils import assert_allclose
label_desc: Use image node_id 2 for calling the HvdEvenlyDivisibleAllGather obj's underlying member method code with example usage: obj._run() without return types