code: def count_preprocessing_fn(text_key, language_code_key):
      """Generates a preprocessing function to be used in generating word counts.
  
      Args:
        text_key: feature key in tf.Example for text
        language_code_key: feature key in tf.Example for language_code
  
      Returns:
        a preprocessing function
      """
  
      def preprocessing_fn(inputs):
          """Function used to transform dataset using TF transform.
  
             Tokenizes input and detects language if there is no associated
             language_code.
  
          Args:
             inputs: dataset of tf.Examples containing text samples
  
          Returns:
             transformed outputs
          """
  
          outputs = {}
  
          tokenizer = BertTokenizer()
          tokens = tokenizer.tokenize(inputs[text_key])
          outputs["tokens"] = tokens.to_sparse()
          outputs["lang"] = tf.convert_to_tensor(
              inputs[language_code_key]
          )
  
          return outputs
  
      return preprocessing_fn
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import apache_beam
  import tensorflow.compat.v1
  from tensorflow_text.python.ops.bert_tokenizer import BertTokenizer
  from tensorflow_text.python.ops.wordpiece_tokenizer import WordpieceTokenizer
  from tensorflow_text.tools.wordpiece_vocab import wordpiece_tokenizer_learner_lib
label_desc: Use image node_id 2 for calling a global function with example usage: count_preprocessing_fn(text_key, language_code_key) and returns: preprocessing_fn, outputs