code: def _get_parameter_size_offsets(
      param: torch.nn.Parameter,
      sharding_type: ShardingType,
      local_size: int,
      world_size: int,
      col_wise_shard_dim: Optional[int] = None,
  ) -> List[Tuple[List[int], List[int]]]:
      (
          shard_sizes,
          shard_offsets,
      ) = calculate_shard_sizes_and_offsets(
          tensor=none_throws(param),
          world_size=world_size,
          local_world_size=local_size,
          sharding_type=sharding_type.value,
          col_wise_shard_dim=col_wise_shard_dim,
      )
      return list(zip(shard_sizes, shard_offsets))
  
imports: import math
  import warnings
  from typing import Callable, cast, Dict, List, Optional, Tuple, Type
  import torch
  from torch import distributed, nn
  from torchrec.distributed.comm import get_local_size
  from torchrec.distributed.embedding import EmbeddingCollectionSharder
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel
  from torchrec.distributed.embeddingbag import EmbeddingBagCollectionSharder
  from torchrec.distributed.fp_embeddingbag import FeatureProcessedEmbeddingBagCollectionSharder
  from torchrec.distributed.fused_embeddingbag import FusedEmbeddingBagCollectionSharder
  from torchrec.distributed.mc_embedding import ManagedCollisionEmbeddingCollectionSharder
  from torchrec.distributed.mc_embeddingbag import ManagedCollisionEmbeddingBagCollectionSharder
  from torchrec.distributed.planner.constants import MIN_CW_DIM
  from torchrec.distributed.quant_embedding import QuantEmbeddingCollectionSharder
  from torchrec.distributed.quant_embeddingbag import QuantEmbeddingBagCollectionSharder
  from torchrec.distributed.types import EmbeddingModuleShardingPlan, EnumerableShardingSpec, ModuleSharder, ParameterSharding, ShardingType, ShardMetadata
  from torchrec.distributed.utils import none_throws
label_desc: Use image node_id 8 for calling a global function with example usage: _get_parameter_size_offsets(param, sharding_type, local_size, world_size, col_wise_shard_dim) and returns: list