code: def _tokenize(feature):
      """Tokenize the two sentences and insert appropriate tokens."""
      processor = BertPreprocessor(_BERT_LINK)
      vocab = processor.get_vocab_name()
      # Annotate asset provides the mapping between the name (_BERT_VOCAB) and the
      # path within the StatsOptions object passed to TFDV (
      # https://github.com/tensorflow/data-validation/blob/master/tensorflow_data_validation/statistics/stats_options.py).
      # This vocab can then be used to compute NLP statistics (see the description
      # of the stats_options_updater_fn below_.
      tft.annotate_asset(_BERT_VOCAB, vocab.decode())
      return processor.tokenize_single_sentence_pad(
          tf.reshape(feature, [-1]), max_len=_MAX_LEN
      )
  
file_path: tfx/tfx/examples/bert/cola/bert_cola_utils.py
imports: from typing import List
  import tensorflow
  import tensorflow_data_validation
  import tensorflow_hub
  import tensorflow_transform
  from tfx import v1
  from tfx.components.transform import stats_options_util
  from tfx.examples.bert.utils.bert_models import build_and_compile_bert_classifier
  from tfx.examples.bert.utils.bert_tokenizer_utils import BertPreprocessor
  from tfx_bsl.public import tfxio
  from google.protobuf import text_format
label_desc: Use image node_id 1 for calling a global function with example usage: _tokenize(feature) and returns: processor