code: def init_embdedding_configs(
      embedding_dim: int,
      num_embeddings_per_feature: Optional[List[int]],
      num_embeddings: int,
  ) -> List[EmbeddingBagConfig]:
      eb_configs = [
          EmbeddingBagConfig(
              name=f"t_{feature_name}",
              embedding_dim=embedding_dim,
              num_embeddings=none_throws(num_embeddings_per_feature)[
                  feature_idx
              ]
              if num_embeddings is None
              else num_embeddings,
              feature_names=[feature_name],
          )
          for feature_idx, feature_name in enumerate(DEFAULT_CAT_NAMES)
      ]
      return eb_configs
  
imports: import argparse
  import sys
  import tempfile
  import uuid
  from typing import Iterator, List, Optional, Tuple
  import torch
  from pyre_extensions import none_throws
  from torch import distributed
  from torch.distributed import launcher
  from torch.distributed.optim.apply_optimizer_in_backward import _apply_optimizer_in_backward
  from torch.utils.data import DataLoader
  from torcheval.metrics.classification.auroc import BinaryAUROC
  from torcheval.metrics.toolkit import sync_and_compute
  from torchrec import EmbeddingBagCollection
  from torchrec.datasets.criteo import DEFAULT_CAT_NAMES, DEFAULT_INT_NAMES
  from torchrec.datasets.random import RandomRecDataset
  from torchrec.distributed import TrainPipelineSparseDist
  from torchrec.distributed.comm import get_local_size
  from torchrec.distributed.model_parallel import DistributedModelParallel, get_default_sharders
  from torchrec.distributed.planner import EmbeddingShardingPlanner, Topology
  from torchrec.distributed.planner.storage_reservations import HeuristicalStorageReservation
  from torchrec.models.dlrm import DLRM, DLRMTrain
  from torchrec.modules.embedding_configs import EmbeddingBagConfig
  from torchrec.optim.keyed import KeyedOptimizerWrapper
  from torchrec.optim.optimizers import in_backward_optimizer_filter
  from torchtnt.framework.callbacks import TQDMProgressBar
  from torchtnt.framework.fit import fit
  from torchtnt.framework.state import State
  from torchtnt.framework.unit import EvalUnit, TrainUnit
  from torchtnt.utils import get_process_group_backend_from_device, init_from_env, rank_zero_print
  from torchtnt.utils.loggers.tensorboard import TensorBoardLogger
label_desc: Use image node_id 3 for calling a global function with example usage: init_embdedding_configs(embedding_dim, num_embeddings_per_feature, num_embeddings) and returns: eb_configs