code: def build_tokens_types_paddings_from_text(
      text_a, text_b, tokenizer, max_seq_length
  ):
      """Build token types and paddings, trim if needed, and pad if needed."""
  
      text_a_ids = tokenizer.tokenize(text_a)
      text_b_ids = None
      if text_b is not None:
          text_b_ids = tokenizer.tokenize(text_b)
  
      return build_tokens_types_paddings_from_ids(
          text_a_ids,
          text_b_ids,
          max_seq_length,
          tokenizer.cls,
          tokenizer.sep,
          tokenizer.pad,
      )
  
imports: import re
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: build_tokens_types_paddings_from_text(text_a, text_b, tokenizer, max_seq_length) and returns: build_tokens_types_paddings_from_ids