code: def __init__(
      self, bert_model, output_dim, layer_pulled=-1, add_linear=None
  ):
      super(BertEncoder, self).__init__()
      self.layer_pulled = layer_pulled
      bert_output_dim = (
          bert_model.embeddings.word_embeddings.weight.size(1)
      )
  
      self.bert_model = bert_model
      if add_linear:
          self.additional_linear = nn.Linear(
              bert_output_dim, output_dim
          )
          self.dropout = nn.Dropout(0.1)
      else:
          self.additional_linear = None
  
imports: from torch import nn
label_desc: Use image node_id 1 to create a new BertEncoder object from inherited base classes: nn with example: obj = BertEncoder(bert_model, output_dim, layer_pulled, add_linear)