code: def export_eval_savedmodel(
      estimator,
      export_dir_base: str,
      eval_input_receiver_fn: Callable[[], EvalInputReceiverType],
      serving_input_receiver_fn: Optional[
          Callable[[], tf_estimator.export.ServingInputReceiver]
      ] = None,
      assets_extra: Optional[Dict[str, str]] = None,
      checkpoint_path: Optional[str] = None,
  ) -> str:
      """Export a 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.
        assets_extra: An optional dict specifying how to populate the assets.extra
          directory within the exported SavedModel.  Each key should give the
          destination path (including the filename) relative to the assets.extra
          directory.  The corresponding value gives the full path of the source file
          to be copied.  For example, the simple case of copying a single file
          without renaming it is specified as
          `{'my_asset_file.txt': '/path/to/my_asset_file.txt'}`.
        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.
  
      Raises:
        ValueError: Could not find a checkpoint to export.
      """
      path = util.export_legacy_eval_savedmodel(
          estimator=estimator,
          export_dir_base=export_dir_base,
          eval_input_receiver_fn=eval_input_receiver_fn,
          serving_input_receiver_fn=serving_input_receiver_fn,
          checkpoint_path=checkpoint_path,
      )
      if path is not None:
          return path
  
      return estimator.experimental_export_all_saved_models(
          export_dir_base=export_dir_base,
          input_receiver_fn_map={
              tf_estimator.ModeKeys.EVAL: eval_input_receiver_fn,
              tf_estimator.ModeKeys.PREDICT: serving_input_receiver_fn,
          },
          assets_extra=assets_extra,
          checkpoint_path=checkpoint_path,
      )
  
file_path: model-analysis/tensorflow_model_analysis/eval_saved_model/export.py
imports: from typing import Any, Callable, Dict, Optional, Union
  import tensorflow
  from tensorflow import estimator
  from tensorflow_model_analysis import version
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_saved_model import constants
  from tensorflow_model_analysis.eval_saved_model import encoding
  from tensorflow_model_analysis.eval_saved_model import util
  from tensorflow_model_analysis.utils import util
  from tensorflow.python.estimator.export import export
label_desc: Use image node_id 6 for calling a global function with example usage: export_eval_savedmodel(estimator, export_dir_base, eval_input_receiver_fn, serving_input_receiver_fn, assets_extra, checkpoint_path) and returns: estimator, path