code: def export_model(
      model, train_input_fn, eval_input_fn, tf_feat_cols, base_dir
  ):
      """Export TensorFlow estimator (model).
  
      Args:
          model (tf.estimator.Estimator): Model to export.
          train_input_fn (function): Training input function to create data receiver spec.
          eval_input_fn (function): Evaluation input function to create data receiver spec.
          tf_feat_cols (list(tf.feature_column)): Feature columns.
          base_dir (str): Base directory to export the model.
  
      Returns:
          str: Exported model path
      """
      tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
      train_rcvr_fn = build_supervised_input_receiver_fn_from_input_fn(
          train_input_fn
      )
      eval_rcvr_fn = build_supervised_input_receiver_fn_from_input_fn(
          eval_input_fn
      )
      serve_rcvr_fn = (
          tf.estimator.export.build_parsing_serving_input_receiver_fn(
              tf.feature_column.make_parse_example_spec(tf_feat_cols)
          )
      )
      rcvr_fn_map = {
          tf.estimator.ModeKeys.TRAIN: train_rcvr_fn,
          tf.estimator.ModeKeys.EVAL: eval_rcvr_fn,
          tf.estimator.ModeKeys.PREDICT: serve_rcvr_fn,
      }
      exported_path = model.experimental_export_all_saved_models(
          export_dir_base=base_dir, input_receiver_fn_map=rcvr_fn_map
      )
  
      return exported_path.decode("utf-8")
  
imports: import itertools
  import numpy
  import tensorflow
  from tensorflow_estimator.python.estimator.export.export import build_supervised_input_receiver_fn_from_input_fn
label_desc: Use image node_id 5 for calling a global function with example usage: export_model(model, train_input_fn, eval_input_fn, tf_feat_cols, base_dir) and returns: exported_path