class_docstr: Class for training and inference examples for BERT.
  
  Attributes:
      editing_task: The EditingTask from which this example was created. Needed
          when realizing labels predicted for this example.
      features: Feature dictionary.
class_docstr_tok: ["Class","for","training","and","inference","examples","for","BERT",".","Attributes",":","editing_task",":","The","EditingTask","from","which","this","example","was","created",".","Needed","when","realizing","labels","predicted","for","this","example",".","features",":","Feature","dictionary","."]
docstr: Pad the feature vectors so that they all have max_seq_length.
  
  Args:
      max_seq_length: The length that all features, except semiotic_classes, will have after padding.
      max_semiotic_length: The length that semiotic_classes will have after padding.
      pad_token_id: input_ids feature is padded with this ID, other features
          with ID 0.
docstr_tok: ["Pad","the","feature","vectors","so","that","they","all","have","max_seq_length",".","Args",":","max_seq_length",":","The","length","that","all","features",",","except","semiotic_classes",",","will","have","after","padding",".","max_semiotic_length",":","The","length","that","semiotic_classes","will","have","after","padding",".","pad_token_id",":","input_ids","feature","is","padded","with","this","ID",",","other","features","with","ID","0","."]
code: def pad_to_max_length(
      self,
      max_seq_length: int,
      max_semiotic_length: int,
      pad_token_id: int,
  ) -> None:
      """Pad the feature vectors so that they all have max_seq_length.
  
      Args:
          max_seq_length: The length that all features, except semiotic_classes, will have after padding.
          max_semiotic_length: The length that semiotic_classes will have after padding.
          pad_token_id: input_ids feature is padded with this ID, other features
              with ID 0.
      """
      pad_len = max_seq_length - len(self.features["input_ids"])
      self.features["semiotic_spans"].extend(
          [(-1, -1, -1)]
          * (max_semiotic_length - len(self.features["semiotic_spans"]))
      )
      for key in self.features:
          if key == "semiotic_spans":
              continue
          pad_id = pad_token_id if (key == "input_ids") else 0
          self.features[key].extend([pad_id] * pad_len)
          if len(self.features[key]) != max_seq_length:
              raise ValueError(
                  "{} has length {} (should be {}).".format(
                      key, len(self.features[key]), max_seq_length
                  )
              )
  
imports: import logging
  from collections import OrderedDict
  from os import path
  from typing import Dict, List, Optional, Tuple, Union
  from transformers import PreTrainedTokenizerBase
  from nemo.collections.nlp.data.text_normalization_as_tagging.tagging import EditingTask, Tag
  from nemo.collections.nlp.data.text_normalization_as_tagging.utils import yield_sources_and_targets
label_desc: Use image node_id 2 for calling the BertExample obj's underlying member method code with example usage: obj.pad_to_max_length(max_seq_length, max_semiotic_length, pad_token_id) without return types