code: def _get_optimizer_multipler(
      optimizer_class: Optional[Type[torch.optim.Optimizer]],
      shape: torch.Size,
  ) -> float:
      if not optimizer_class:
          return 0.0
      if optimizer_class in [torch.optim.SGD, trec_optim.SGD]:
          return 0
      elif optimizer_class in [torch.optim.Adam, trec_optim.Adam]:
          return 2
      elif optimizer_class == trec_optim.RowWiseAdagrad:
          return 1 / shape[-1]
      else:
          return 1
  
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 16 for calling a global function with example usage: _get_optimizer_multipler(optimizer_class, shape) and returns: int, int, int, unknown, int