class_docstr: Shards embedding bags table-wise, i.e.. a given embedding table is entirely placed
  on a selected rank.
class_docstr_tok: ["Shards","embedding","bags","table-wise",",","i.e","..","a","given","embedding","table","is","entirely","placed","on","a","selected","rank","."]
code: def create_output_dist(
      self,
      device: Optional[torch.device] = None,
  ) -> BaseEmbeddingDist[
      EmbeddingShardingContext, torch.Tensor, torch.Tensor
  ]:
      assert self._pg is not None
      return TwPooledEmbeddingDist(
          pg=self._pg,
          dim_sum_per_rank=self._dim_sum_per_rank(),
          emb_dim_per_rank_per_feature=self._emb_dim_per_rank_per_feature(),
          device=device if device is not None else self._device,
          qcomm_codecs_registry=self.qcomm_codecs_registry,
      )
  
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 3 for calling the TwPooledEmbeddingSharding obj's underlying member method code with example usage: obj.create_output_dist(device) and returns: TwPooledEmbeddingDist