code: def _calculate_dp_shard_io_sizes(
      batch_sizes: List[int],
      input_lengths: List[float],
      emb_dim: int,
      num_shards: int,
      input_data_type_size: int,
      output_data_type_size: int,
      num_poolings: List[float],
      is_pooled: bool,
  ) -> Tuple[List[int], List[int]]:
      batch_inputs = sum(
          [
              x * y * z
              for x, y, z in zip(
                  input_lengths, num_poolings, batch_sizes
              )
          ]
      )
      batch_outputs = (
          sum([x * y for x, y in zip(num_poolings, batch_sizes)])
          if is_pooled
          else batch_inputs
      )
  
      input_sizes = [
          math.ceil(batch_inputs * input_data_type_size)
      ] * num_shards
      output_sizes = [
          math.ceil(batch_outputs * emb_dim * output_data_type_size)
      ] * num_shards
  
      return input_sizes, output_sizes
  
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 10 for calling a global function with example usage: _calculate_dp_shard_io_sizes(batch_sizes, input_lengths, emb_dim, num_shards, input_data_type_size, output_data_type_size, num_poolings, is_pooled) and returns: input_sizes,  output_sizes