code: def __init__(self, prefix: str, weights, reduce=True):
      super().__init__()
      weight = weights.get_partial_sharded(f"{prefix}.weight", dim=0)
      num_embeddings = weights.get_shape(f"{prefix}.weight")[0]
  
      process_group = weights.process_group
  
      world_size = process_group.size()
      rank = process_group.rank()
  
      block_size = num_embeddings // world_size
      self.min_id = rank * block_size
      self.max_id = min(num_embeddings, (rank + 1) * block_size)
      self.null_idx = block_size
      self.process_group = weights.process_group
      self.reduce = reduce
  
      """Additional 0 entry used for masking"""
      self.weight = nn.Parameter(F.pad(weight, (0, 0, 0, 1)))
  
imports: import os
  import torch
  import torch.distributed
  from torch import nn
  from torch.nn import functional
  from typing import List
  from loguru import logger
  from functools import lru_cache
  from accelerate import init_empty_weights
  from text_generation_server.utils.gptq.quant_linear import QuantLinear
  from text_generation_server.utils.import_utils import IS_CUDA_SYSTEM, IS_ROCM_SYSTEM
  from text_generation_server.utils.log import log_once
label_desc: Use image node_id 1 to create a new TensorParallelEmbedding object from inherited base classes: nn with example: obj = TensorParallelEmbedding(prefix, weights, reduce)