code: def test_pooled_embeddings(
      self,
      backend: str,
      B: int,
      features: int,
      is_reversed: bool,
      variable_batch_size: bool,
      qcomms_config: Optional[QCommsConfig],
  ) -> None:
      world_size = 2
      keys = [f"F{feature}" for feature in range(features)]
      dims = random.sample([8, 16, 32] * features, features)
      rank0_split = random.randint(1, features - 1)
      splits = [rank0_split, features - rank0_split]
      if is_reversed:
          splits.reverse()
      dim_sum_per_rank = [
          sum(dims[: splits[0]]),
          sum(dims[splits[0] :]),
      ]
  
      if variable_batch_size:
          batch_size_per_rank = [
              random.randint(B, B + 4),
              random.randint(B, B + 4),
          ]
      else:
          batch_size_per_rank = [B, B]
  
      _input, output = _generate_pooled_embedding_batch(
          keys=keys,
          dims=dims,
          splits=splits,
          batch_size_per_rank=batch_size_per_rank,
      )
  
      kwargs_per_rank = []
      for rank in range(world_size):
          kwargs_per_rank.append(
              {
                  "_input": _input[rank],
                  "output": output[rank],
                  "backend": backend,
                  "dim_sum_per_rank": dim_sum_per_rank,
                  "batch_size_per_rank": batch_size_per_rank,
                  "qcomms_config": qcomms_config,
              }
          )
      self._run_multi_process_test_per_rank(
          callable=self._run_test_dist,
          world_size=world_size,
          kwargs_per_rank=kwargs_per_rank,
      )
  
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 2 for calling the PooledEmbeddingsAllToAllTest obj's underlying member method code with example usage: obj.test_pooled_embeddings(backend, B, features, is_reversed, variable_batch_size, qcomms_config) without return types