code: def export_legacy_eval_savedmodel(
      estimator,
      export_dir_base: str,
      eval_input_receiver_fn: Callable[[], Any],
      serving_input_receiver_fn: Optional[
          Callable[[], tf_estimator.export.ServingInputReceiver]
      ] = None,
      checkpoint_path: Optional[str] = None,
  ) -> Optional[bytes]:
      """Exports a legacy EvalSavedModel for the given estimator.
  
      Args:
        estimator: Estimator to export the graph for.
        export_dir_base: Base path for export. Graph will be exported into a
          subdirectory of this base path.
        eval_input_receiver_fn: Eval input receiver function.
        serving_input_receiver_fn: (Optional) Serving input receiver function. We
          recommend that you provide this as well, so that the exported SavedModel
          also contains the serving graph. If not provided, the serving graph will
          not be included in the exported SavedModel.
        checkpoint_path: Path to a specific checkpoint to export. If set to None,
          exports the latest checkpoint.
  
      Returns:
        Path to the directory where the EvalSavedModel was exported or None if
        legacy export not required.
  
      Raises:
        ValueError: Could not find a checkpoint to export.
      """
      del estimator
      del export_dir_base
      del (eval_input_receiver_fn,)
      del serving_input_receiver_fn
      del checkpoint_path
      return
  
file_path: model-analysis/tensorflow_model_analysis/eval_saved_model/util.py
imports: from typing import Any, Callable, List, Optional, Tuple
  import numpy
  import tensorflow
  from tensorflow import estimator
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.utils import util
  from tensorflow.core.example import example_pb2
label_desc: Use image node_id 12 for calling a global function with example usage: export_legacy_eval_savedmodel(estimator, export_dir_base, eval_input_receiver_fn, serving_input_receiver_fn, checkpoint_path) without return types