class_docstr: A class that tokenizes and otherwise processes text to be encoded
  by a BERT model.
docstr: Converts a list of text into a dataframe containing padded token ids,
  masks distinguishing word tokens from pads, and word token counts for each text in the list.
  
  :param data: A list of strings
  :type data: List[str]
  :return: Pandas Dataframe of string
  :rtype  pd.DataFrame
docstr_tok: ["Converts","a","list","of","text","into","a","dataframe","containing","padded","token","ids",",","masks","distinguishing","word","tokens","from","pads",",","and","word","token","counts","for","each","text","in","the","list",".",":","param","data",":","A","list","of","strings",":","type","data",":","List","[","str","]",":","return",":","Pandas","Dataframe","of","string",":","rtype","pd.DataFrame"]
code: def preprocess(self, data: List[str]) -> pd.DataFrame:
      """Converts a list of text into a dataframe containing padded token ids,
      masks distinguishing word tokens from pads, and word token counts for each text in the list.
  
      :param data: A list of strings
      :type data: List[str]
      :return: Pandas Dataframe of string
      :rtype  pd.DataFrame
      """
      input_ids = []
      attention_mask = []
      counts = []
  
      tokenizer = self.get_tokenizer()
      for text in data:
          d = tokenizer.encode_plus(
              text,
              max_length=self.MAX_TOKEN_LENGTH,
              pad_to_max_length=self.TOKEN_PAD_TO_MAX,
          )
          input_ids.append(d["input_ids"])
          attention_mask.append(d["attention_mask"])
          counts.append(sum(d["attention_mask"]))
  
      tokens = pd.DataFrame(
          {
              "tokens": input_ids,
              "mask": attention_mask,
              "counts": counts,
          }
      )
  
      return tokens
  
file_path: interpret-text/python/interpret_text/experimental/common/preprocessor/bert_preprocessor.py
imports: import pandas
  from typing import List
  from interpret_text.experimental.common.base_explainer import BaseTextPreprocessor
  from transformers import BertTokenizer
label_desc: Use image node_id 2 for calling the BertPreprocessor obj's underlying member method code with example usage: obj.preprocess(data) and returns: tokens