code: def __init__(self, config, initial_weights=None):
      super().__init__()
      self.word_embeddings = nn.Embedding(
          config.vocab_size,
          config.embedding_dim,
          padding_idx=config.padding_idx,
      )
      self.position_embeddings = nn.Embedding(
          config.max_seq_len, config.embedding_dim
      )
      self.token_type_embeddings = nn.Embedding(
          config.type_vocab_size, config.embedding_dim
      )
  
      self.LayerNorm = nn.LayerNorm(
          config.embedding_dim, eps=config.layer_norm_eps
      )
      self.dropout = nn.Dropout(config.dropout)
  
      self.register_buffer(
          "position_ids",
          torch.arange(config.max_seq_len).expand((1, -1)),
      )
      self.register_buffer(
          "token_type_ids",
          torch.zeros(self.position_ids.size(), dtype=torch.long),
          persistent=False,
      )
  
      self.emb_quant = TensorQuantizer(emb_quant_config)
  
      if initial_weights is None:
          return
  
      # load initial weights
      self.word_embeddings.weight.data.copy_(
          copy_para(initial_weights[0], config.fp16)
      )
      self.position_embeddings.weight.data.copy_(
          copy_para(initial_weights[1], config.fp16)
      )
      self.token_type_embeddings.weight.data.copy_(
          copy_para(initial_weights[2], config.fp16)
      )
      self.LayerNorm.weight.data.copy_(
          copy_para(initial_weights[3], config.fp16)
      )
      self.LayerNorm.bias.data.copy_(
          copy_para(initial_weights[4], config.fp16)
      )
  
imports: import math
  import uuid
  from typing import Dict, Optional, List
  import torch
  from torch import Tensor, nn
  from torch.nn import Parameter, LayerNorm, Dropout
  from lightseq.training.ops.pytorch import util
  from lightseq.training.ops.pytorch.layer_base import TransformerEmbeddingLayerBase, TransformerEncoderLayerBase, TransformerDecoderLayerBase
  from .quantization import QuantLinear, TensorQuantizer, act_quant_config, weight_quant_config, out_quant_config, emb_quant_config
label_desc: Use image node_id 1 to create a new BertEmbeddingLayer object from inherited base classes: TransformerEmbeddingLayerBase with example: obj = BertEmbeddingLayer(config, initial_weights)