code: def __init__(self, config):
      super(BertSelfAttention, self).__init__()
      if config.hidden_size % config.num_attention_heads != 0:
          raise ValueError(
              "The hidden size (%d) is not a multiple of the number of attention "
              "heads (%d)"
              % (config.hidden_size, config.num_attention_heads)
          )
      self.output_attentions = config.output_attentions
  
      self.num_attention_heads = config.num_attention_heads
      self.attention_head_size = int(
          config.hidden_size / config.num_attention_heads
      )
      self.all_head_size = (
          self.num_attention_heads * self.attention_head_size
      )
  
      self.query = quantized_linear_setup(
          config,
          "attention_query",
          config.hidden_size,
          self.all_head_size,
      )
      self.key = quantized_linear_setup(
          config,
          "attention_key",
          config.hidden_size,
          self.all_head_size,
      )
      self.value = quantized_linear_setup(
          config,
          "attention_value",
          config.hidden_size,
          self.all_head_size,
      )
  
      self.dropout = nn.Dropout(config.attention_probs_dropout_prob)
  
imports: import logging
  import os
  import sys
  import torch
  from torch import nn
  from transformers.modeling_bert import ACT2FN, BertAttention, BertConfig, BertEmbeddings, BertEncoder, BertForQuestionAnswering, BertForSequenceClassification, BertForTokenClassification, BertIntermediate, BertLayer, BertLayerNorm, BertModel, BertOutput, BertPooler, BertPreTrainedModel, BertSelfAttention, BertSelfOutput
  from nlp_architect.models.pretrained_models import S3_PREFIX
  from nlp_architect.nn.torch.quantization import QuantizationConfig, QuantizedEmbedding, QuantizedLayer, QuantizedLinear
label_desc: Use image node_id 1 to create a new QuantizedBertSelfAttention object from inherited base classes: BertSelfAttention with example: obj = QuantizedBertSelfAttention(config)