code: def _validate(
      cls,
      actual_output_awaitable: Union[
          KJTAllToAllSplitsAwaitable, KeyedJaggedTensor
      ],
      expected_output_awaitable: Union[
          KJTAllToAllSplitsAwaitable, KeyedJaggedTensor
      ],
  ) -> None:
      actual_output = (
          actual_output_awaitable
          if isinstance(actual_output_awaitable, KeyedJaggedTensor)
          else actual_output_awaitable.wait().wait()
      )
      expected_output = (
          expected_output_awaitable
          if isinstance(expected_output_awaitable, KeyedJaggedTensor)
          else expected_output_awaitable.wait().wait()
      )
      torch.testing.assert_close(
          actual_output.values().cpu(),
          expected_output.values().cpu(),
      )
      torch.testing.assert_close(
          actual_output.weights().cpu()
          if actual_output.weights_or_none() is not None
          else [],
          expected_output.weights().cpu()
          if expected_output.weights_or_none() is not None
          else [],
      )
      torch.testing.assert_close(
          actual_output.lengths().cpu(),
          expected_output.lengths().cpu(),
      )
      assert actual_output.keys() == expected_output.keys()
  
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 KJTAllToAllTest obj's underlying member method code with example usage: obj._validate(cls, actual_output_awaitable, expected_output_awaitable) without return types