class_docstr: Embedding parallelized in the vocabulary dimension.
  
  Args:
      num_embeddings (int): number of embeddings.
      embedding_dim (int): dimension of embedding.
      padding_idx (int, optional): If specified, the entries at padding_idx do not contribute to the gradient;
          therefore, the embedding vector at padding_idx is not updated during training,
          i.e. it remains as a fixed “pad”, defaults to None.
      dtype (:class:`torch.dtype`, optional): The dtype of parameters, defaults to None.
      weight_initializer (:class:`typing.Callable`, optional):
          he initializer of weight, defaults to normal initializer.
  
  The ``args`` and ``kwargs`` used in :class:``torch.nn.functional.embedding`` should contain:
  ::
  
      max_norm (float, optional): If given, each embedding vector with norm larger than max_norm is
                  renormalized to have norm max_norm. Note: this will modify weight in-place.
      norm_type (float, optional): The p of the p-norm to compute for the max_norm option. Default 2.
      scale_grad_by_freq (bool, optional): If given, this will scale gradients by the inverse
                  of frequency of the words in the mini-batch. Default False.
      sparse (bool, optional): If True, gradient w.r.t. weight will be a sparse tensor. Default False.
  
  More details about ``args`` and ``kwargs`` could be found in
  `Embedding <https://pytorch.org/docs/stable/generated/torch.nn.functional.embedding.html#torch.nn.functional.embedding>`_.
  
  More details about initializer please refer to
  `init <https://github.com/hpcaitech/ColossalAI/blob/main/colossalai/nn/init.py>`_.
code: def _select_padding_idx(self, padding_idx: int):
      # select padding index according to the rank
      if padding_idx is None:
          return None
      elif (
          padding_idx < self.vocab_end_index
          and padding_idx >= self.vocab_start_index
      ):
          return padding_idx - self.vocab_start_index
      else:
          return None
  
imports: from typing import Callable, List, Optional, Union
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from torch.distributed import ProcessGroup
  from colossalai.lazy import LazyInitContext
  from colossalai.nn import init
  from colossalai.nn.layer.utils import divide
  from colossalai.tensor.d_tensor.api import is_distributed_tensor, shard_colwise, shard_rowwise, sharded_tensor_to_existing_param
  from ._operation import gather_forward_split_backward, reduce_forward
  from .parallel_module import ParallelModule
  from .utils import create_randomizer_with_offset
label_desc: Use image node_id 5 for calling the VocabParallelEmbedding1D obj's underlying member method code with example usage: obj._select_padding_idx(padding_idx) and returns: None, unknown, None