code: def _run_test_dist(
      cls,
      rank: int,
      world_size: int,
      input: torch.Tensor,
      input_splits: List[int],
      expected_output: torch.Tensor,
      qcomms_config: Optional[QCommsConfig] = None,
  ) -> None:
      dist.init_process_group(rank=rank, world_size=2, backend="nccl")
      pg = dist.group.WORLD
      input = input.cuda(rank)
      input.requires_grad = True
  
      codecs = get_qcomm_codecs(qcomms_config)
  
      rs = PooledEmbeddingsReduceScatter(
          # pyre-fixme[6]: For 1st param expected `ProcessGroup` but got
          #  `Optional[_distributed_c10d.ProcessGroup]`.
          pg,
          codecs=codecs,
      ).cuda(rank)
      actual_output = rs(input, input_splits=input_splits).wait()
      s = torch.sum(actual_output)
      s.backward()
  
      atol, rtol = None, None
      if qcomms_config is not None:
          atol, rtol = 0.003, 0.004
      torch.testing.assert_close(
          actual_output.cpu().detach(),
          expected_output.cpu().detach(),
          rtol=rtol,
          atol=atol,
      )
      if qcomms_config is None:
          torch.testing.assert_close(
              # pyre-ignore
              input.grad.cpu().detach(),
              torch.ones(input.size()).div_(world_size),
          )
  
imports: import itertools
  import random
  import unittest
  from typing import Dict, Generator, Iterable, List, Optional, Tuple, TypeVar, Union
  import hypothesis.strategies
  import torch
  import torch.distributed
  from hypothesis import given, settings
  from torchrec.distributed.dist_data import _get_recat, KJTAllToAll, KJTAllToAllSplitsAwaitable, PooledEmbeddingsAllGather, PooledEmbeddingsAllToAll, PooledEmbeddingsReduceScatter, SequenceEmbeddingsAllToAll, VariableBatchPooledEmbeddingsAllToAll
  from torchrec.distributed.fbgemm_qcomm_codec import CommType, get_qcomm_codecs, QCommsConfig
  from torchrec.distributed.test_utils.multi_process import MultiProcessTestBase
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
label_desc: Use image node_id 1 for calling the PooledEmbeddingsReduceScatterVTest obj's underlying member method code with example usage: obj._run_test_dist(cls, rank, world_size, input, input_splits, expected_output, qcomms_config) without return types