code: def simple_batch_size_limited_classifier(
      export_path, eval_export_path
  ):
      """Exports a simple fixed prediction classifier."""
  
      estimator = tf_estimator.Estimator(model_fn=model_fn)
      estimator.train(input_fn=train_input_fn, steps=1)
  
      serving_input_receiver_fn = (
          tf_estimator.export.build_parsing_serving_input_receiver_fn(
              feature_spec={
                  "classes": tf.io.FixedLenFeature([], dtype=tf.string),
                  "scores": tf.io.FixedLenFeature([], dtype=tf.float32),
              }
          )
      )
      eval_input_receiver_fn = (
          export.build_parsing_eval_input_receiver_fn(
              feature_spec={
                  "classes": tf.io.FixedLenFeature([], dtype=tf.string),
                  "scores": tf.io.FixedLenFeature([], dtype=tf.float32),
                  "labels": tf.io.FixedLenFeature([], dtype=tf.string),
              },
              label_key="labels",
          )
      )
  
      return util.export_model_and_eval_model(
          estimator=estimator,
          serving_input_receiver_fn=serving_input_receiver_fn,
          eval_input_receiver_fn=eval_input_receiver_fn,
          export_path=export_path,
          eval_export_path=eval_export_path,
      )
  
file_path: model-analysis/tensorflow_model_analysis/eval_saved_model/example_trainers/batch_size_limited_classifier.py
imports: import tensorflow
  from tensorflow import estimator
  from tensorflow_model_analysis.eval_saved_model import export
  from tensorflow_model_analysis.eval_saved_model.example_trainers import util
  from tensorflow.python.estimator.canned import metric_keys
  from tensorflow.python.estimator.canned import prediction_keys
label_desc: Use image node_id 3 for calling a global function with example usage: simple_batch_size_limited_classifier(export_path, eval_export_path) and returns: util