code: def _get_serve_tf_examples_fn(model, tf_transform_output):
      """Returns a function that parses a serialized tf.Example."""
  
      model.tft_layer = tf_transform_output.transform_features_layer()
  
      @tf.function
      def serve_tf_examples_fn(serialized_tf_examples):
          """Returns the output to be used in the serving signature."""
          feature_spec = tf_transform_output.raw_feature_spec()
          feature_spec.pop(_LABEL_KEY)
          parsed_features = tf.io.parse_example(
              serialized_tf_examples, feature_spec
          )
  
          transformed_features = model.tft_layer(parsed_features)
  
          return model(transformed_features)
  
      return serve_tf_examples_fn
  
file_path: tfx/tfx/examples/bert/mrpc/bert_mrpc_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 5 for calling a global function with example usage: _get_serve_tf_examples_fn(model, tf_transform_output) and returns: serve_tf_examples_fn, model