class_docstr: Merges pooled embedding tensor from each device for inference.
  
  Args:
      device (Optional[torch.device]): device on which buffer will be allocated.
      world_size (int): number of devices in the topology.
class_docstr_tok: ["Merges","pooled","embedding","tensor","from","each","device","for","inference",".","Args",":","device","(","Optional","[","torch.device","]",")",":","device","on","which","buffer","will","be","allocated",".","world_size","(","int",")",":","number","of","devices","in","the","topology","."]
code: def __init__(
      self,
      device: torch.device,
      world_size: int,
  ) -> None:
      super().__init__()
      self._dist: EmbeddingsAllToOne = EmbeddingsAllToOne(
          device, world_size, 1
      )
  
imports: from typing import Any, Callable, cast, Dict, List, Optional, TypeVar, Union
  import torch
  import torch.distributed
  from torchrec.distributed.dist_data import EmbeddingsAllToOne, KJTAllToAll, KJTOneToAll, PooledEmbeddingsAllToAll, VariableBatchPooledEmbeddingsAllToAll
  from torchrec.distributed.embedding_lookup import GroupedPooledEmbeddingsLookup, InferGroupedPooledEmbeddingsLookup
  from torchrec.distributed.embedding_sharding import BaseEmbeddingDist, BaseEmbeddingLookup, BaseSparseFeaturesDist, EmbeddingSharding, EmbeddingShardingContext, EmbeddingShardingInfo, group_tables
  from torchrec.distributed.embedding_types import BaseGroupedFeatureProcessor, EmbeddingComputeKernel, GroupedEmbeddingConfig, KJTList, ShardedEmbeddingTable
  from torchrec.distributed.types import Awaitable, CommOp, NullShardingContext, QuantizedCommCodecs, ShardedTensorMetadata, ShardingEnv, ShardMetadata
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
  from torchrec.streamable import Multistreamable
label_desc: Use image node_id 1 to create a new InferTwPooledEmbeddingDist object from inherited base classes: BaseEmbeddingDist with example: obj = InferTwPooledEmbeddingDist(device, world_size)