class_docstr: Base class for table wise row wise sharding.
class_docstr_tok: ["Base","class","for","table","wise","row","wise","sharding","."]
code: def _features_per_rank(
      self, group: List[List[GroupedEmbeddingConfig]]
  ) -> List[int]:
      features_per_rank = []
      for grouped_embedding_configs in group:
          num_features = 0
          for grouped_config in grouped_embedding_configs:
              num_features += grouped_config.num_features()
          features_per_rank.append(num_features)
      return features_per_rank
  
imports: import itertools
  import math
  from typing import Any, cast, Dict, List, Optional, Tuple, TypeVar, Union
  import torch
  import torch.distributed
  from torchrec.distributed.comm import get_local_size, intra_and_cross_node_pg
  from torchrec.distributed.dist_data import KJTAllToAll, PooledEmbeddingsAllToAll, PooledEmbeddingsReduceScatter, VariableBatchPooledEmbeddingsAllToAll, VariableBatchPooledEmbeddingsReduceScatter
  from torchrec.distributed.embedding_lookup import GroupedPooledEmbeddingsLookup
  from torchrec.distributed.embedding_sharding import BaseEmbeddingDist, BaseEmbeddingLookup, BaseSparseFeaturesDist, bucketize_kjt_before_all2all, EmbeddingSharding, EmbeddingShardingContext, EmbeddingShardingInfo, group_tables
  from torchrec.distributed.embedding_types import BaseGroupedFeatureProcessor, EmbeddingComputeKernel, GroupedEmbeddingConfig, ShardedEmbeddingTable
  from torchrec.distributed.types import Awaitable, CommOp, QuantizedCommCodecs, ShardedTensorMetadata, ShardingEnv, ShardMetadata
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
  from torchrec.streamable import Multistreamable
label_desc: Use image node_id 11 for calling the BaseTwRwEmbeddingSharding obj's underlying member method code with example usage: obj._features_per_rank(group) and returns: features_per_rank