docstr: Args:
      max_length: max length of sentence
      pretrain_path: path of pretrain model
docstr_tok: ["Args",":","max_length",":","max","length","of","sentence","pretrain_path",":","path","of","pretrain","model"]
code: def __init__(
      self,
      max_length,
      pretrain_path,
      blank_padding=True,
      mask_entity=False,
  ):
      """
      Args:
          max_length: max length of sentence
          pretrain_path: path of pretrain model
      """
      super().__init__()
      self.max_length = max_length
      self.blank_padding = blank_padding
      self.hidden_size = 768
      self.mask_entity = mask_entity
      logging.info("Loading BERT pre-trained checkpoint.")
      self.bert = BertModel.from_pretrained(pretrain_path)
      self.tokenizer = BertTokenizer.from_pretrained(pretrain_path)
  
file_path: OpenNRE/opennre/encoder/bert_encoder.py
imports: import logging
  import torch
  import torch.nn
  from transformers import BertModel, BertTokenizer
  from .base_encoder import BaseEncoder
label_desc: Use image node_id 1 to create a new BERTEncoder object from inherited base classes: nn with example: obj = BERTEncoder(max_length, pretrain_path, blank_padding, mask_entity)