code: def test_evaluate_step_run(
      tmp_recipe_root_path: Path,
      tmp_recipe_exec_path: Path,
      mae_threshold: int,
  ):
      evaluate_step_output_dir = tmp_recipe_exec_path.joinpath(
          "steps", "evaluate", "outputs"
      )
      evaluate_step_output_dir.mkdir(parents=True)
  
      recipe_yaml = tmp_recipe_root_path.joinpath(
          _RECIPE_CONFIG_FILE_NAME
      )
      recipe_yaml.write_text(
          f"""
  recipe: "regression/v1"
  target_col: "y"
  experiment:
    tracking_uri: {mlflow.get_tracking_uri()}
  steps:
    evaluate:
      validation_criteria:
        - metric: root_mean_squared_error
          threshold: 1_000_000
        - metric: mean_absolute_error
          threshold: {mae_threshold}
        - metric: weighted_mean_squared_error
          threshold: 1_000_000
  custom_metrics:
    - name: weighted_mean_squared_error
      function: weighted_mean_squared_error_func
      greater_is_better: False
  """
      )
      recipe_steps_dir = tmp_recipe_root_path.joinpath("steps")
      recipe_steps_dir.mkdir(parents=True)
      recipe_steps_dir.joinpath("custom_metrics.py").write_text(
          """
  def weighted_mean_squared_error_func(eval_df, builtin_metrics):
      from sklearn.metrics import mean_squared_error
  
      return mean_squared_error(
          eval_df["prediction"],
          eval_df["target"],
          sample_weight=1 / eval_df["prediction"].values,
      )
  """
      )
      recipe_config = read_yaml(
          tmp_recipe_root_path, _RECIPE_CONFIG_FILE_NAME
      )
      evaluate_step = EvaluateStep.from_recipe_config(
          recipe_config, str(tmp_recipe_root_path)
      )
      evaluate_step.run(str(evaluate_step_output_dir))
  
      logged_metrics = (
          mlflow.tracking.MlflowClient()
          .get_run(mlflow.last_active_run().info.run_id)
          .data.metrics
      )
      assert "test_weighted_mean_squared_error" in logged_metrics
      model_validation_status_path = evaluate_step_output_dir.joinpath(
          "model_validation_status"
      )
      assert model_validation_status_path.exists()
      expected_status = "REJECTED" if mae_threshold < 0 else "VALIDATED"
      assert model_validation_status_path.read_text() == expected_status
  
imports: import os
  import shutil
  from pathlib import Path
  from unittest import mock
  import pytest
  from sklearn.datasets import load_diabetes, load_iris
  import mlflow
  from mlflow.exceptions import MlflowException
  from mlflow.recipes.steps.evaluate import EvaluateStep
  from mlflow.recipes.steps.split import _OUTPUT_TEST_FILE_NAME, _OUTPUT_VALIDATION_FILE_NAME
  from mlflow.recipes.steps.train import TrainStep
  from mlflow.recipes.utils import _RECIPE_CONFIG_FILE_NAME
  from mlflow.utils.file_utils import read_yaml
  from tests.recipes.helper_functions import train_and_log_classification_model, train_and_log_model
label_desc: Use image node_id 2 for calling a global function with example usage: test_evaluate_step_run(tmp_recipe_root_path, tmp_recipe_exec_path, mae_threshold) without return types