class_docstr: Bert-base Model preprocessor.
class_docstr_tok: ["Bert-base","Model","preprocessor","."]
docstr: Apply transformation on data, create fixed length representation.
  
  :param data_pack: Inputs to be preprocessed.
  :param verbose: Verbosity.
  
  :return: Transformed data as :class:`DataPack` object.
docstr_tok: ["Apply","transformation","on","data",",","create","fixed","length","representation",".",":","param","data_pack",":","Inputs","to","be","preprocessed",".",":","param","verbose",":","Verbosity",".",":","return",":","Transformed","data","as",":","class",":","`","DataPack","`","object","."]
code: def transform(
      self, data_pack: DataPack, verbose: int = 1
  ) -> DataPack:
      """
      Apply transformation on data, create fixed length representation.
  
      :param data_pack: Inputs to be preprocessed.
      :param verbose: Verbosity.
  
      :return: Transformed data as :class:`DataPack` object.
      """
      data_pack = data_pack.copy()
      data_pack.apply_on_text(
          chain_transform(self._units), inplace=True, verbose=verbose
      )
  
      data_pack.apply_on_text(
          self._context["filter_unit"].transform,
          mode="right",
          inplace=True,
          verbose=verbose,
      )
      data_pack.apply_on_text(
          self._context["vocab_unit"].transform,
          mode="both",
          inplace=True,
          verbose=verbose,
      )
      data_pack.append_text_length(inplace=True, verbose=verbose)
      data_pack.apply_on_text(
          self._left_fixedlength_unit.transform,
          mode="left",
          inplace=True,
          verbose=verbose,
      )
      data_pack.apply_on_text(
          self._right_fixedlength_unit.transform,
          mode="right",
          inplace=True,
          verbose=verbose,
      )
  
      max_len_left = self._fixed_length_left
      max_len_right = self._fixed_length_right
  
      data_pack.left["length_left"] = data_pack.left[
          "length_left"
      ].apply(lambda val: min(val, max_len_left))
  
      data_pack.right["length_right"] = data_pack.right[
          "length_right"
      ].apply(lambda val: min(val, max_len_right))
      return data_pack
  
file_path: MatchZoo/matchzoo/preprocessors/bert_preprocessor.py
imports: from tqdm import tqdm
  from .None import units
  from .chain_transform import chain_transform
  from matchzoo import DataPack
  from matchzoo.engine.base_preprocessor import BasePreprocessor
  from .build_vocab_unit import built_bert_vocab_unit
  from .build_unit_from_data_pack import build_unit_from_data_pack
label_desc: Use image node_id 3 for calling the BertPreprocessor obj's underlying member method code with example usage: obj.transform(data_pack, verbose) and returns: data_pack