code: def _extract_comm_data_type_size(
      sharder: ModuleSharder[nn.Module], sharding_option: ShardingOption
  ) -> Tuple[float, float, float, float]:
      table_data_type_size = sharding_option.tensor.element_size()
  
      fwd_a2a_comm_data_type_size = table_data_type_size
      bwd_a2a_comm_data_type_size = table_data_type_size
      fwd_sr_comm_data_type_size = table_data_type_size
      bwd_sr_comm_data_type_size = table_data_type_size
  
      if sharder.qcomm_codecs_registry is not None:
          qcomm_codecs_registry = sharder.qcomm_codecs_registry
          if (
              sharding_option.is_pooled
              and CommOp.POOLED_EMBEDDINGS_ALL_TO_ALL.name
              in qcomm_codecs_registry
          ):
              codecs = sharder.qcomm_codecs_registry[
                  CommOp.POOLED_EMBEDDINGS_ALL_TO_ALL.name
              ]
              fwd_a2a_comm_data_type_size = torch.tensor(
                  [], dtype=codecs.forward.quantized_dtype
              ).element_size()
              bwd_a2a_comm_data_type_size = torch.tensor(
                  [], dtype=codecs.backward.quantized_dtype
              ).element_size()
  
          if (
              not sharding_option.is_pooled
              and CommOp.SEQUENCE_EMBEDDINGS_ALL_TO_ALL.name
              in qcomm_codecs_registry
          ):
              codecs = qcomm_codecs_registry[
                  CommOp.SEQUENCE_EMBEDDINGS_ALL_TO_ALL.name
              ]
              fwd_a2a_comm_data_type_size = torch.tensor(
                  [], dtype=codecs.forward.quantized_dtype
              ).element_size()
              bwd_a2a_comm_data_type_size = torch.tensor(
                  [], dtype=codecs.backward.quantized_dtype
              ).element_size()
  
          if (
              sharding_option.is_pooled
              and CommOp.POOLED_EMBEDDINGS_REDUCE_SCATTER.name
              in qcomm_codecs_registry
          ):
              codecs = qcomm_codecs_registry[
                  CommOp.POOLED_EMBEDDINGS_REDUCE_SCATTER.name
              ]
              fwd_sr_comm_data_type_size = torch.tensor(
                  [], dtype=codecs.forward.quantized_dtype
              ).element_size()
              bwd_sr_comm_data_type_size = torch.tensor(
                  [], dtype=codecs.backward.quantized_dtype
              ).element_size()
  
      return (
          fwd_a2a_comm_data_type_size,
          bwd_a2a_comm_data_type_size,
          fwd_sr_comm_data_type_size,
          bwd_sr_comm_data_type_size,
      )
  
imports: import logging
  import math
  from typing import cast, Dict, List, Optional, Tuple, Type
  import torch
  import torchrec.optim
  from torch import nn
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel
  from torchrec.distributed.planner.constants import BATCHED_COPY_PERF_FACTOR, BIGINT_DTYPE, DP_ELEMENTWISE_KERNELS_PERF_FACTOR, FULL_BLOCK_EMB_DIM, HALF_BLOCK_PENALTY, kernel_bw_lookup, QUARTER_BLOCK_PENALTY, UVM_CACHING_RATIO, WEIGHTED_KERNEL_MULTIPLIER
  from torchrec.distributed.planner.types import ParameterConstraints, Perf, PlannerError, ShardEstimator, ShardingOption, Storage, Topology
  from torchrec.distributed.planner.utils import prod, sharder_name
  from torchrec.distributed.types import CacheStatistics, CommOp, ModuleSharder, ShardingType
  from torchrec.modules.embedding_modules import EmbeddingBagCollectionInterface
label_desc: Use image node_id 7 for calling a global function with example usage: _extract_comm_data_type_size(sharder, sharding_option) and returns: fwd_a2a_comm_data_type_size,  bwd_a2a_comm_data_type_size,  fwd_sr_comm_data_type_size,  bwd_sr_comm_data_type_size