code: def test_predict_step_uses_register_step_output(
      tmp_recipe_root_path: Path,
      tmp_recipe_exec_path: Path,
      predict_step_output_dir: Path,
      spark_session,
  ):
      # Create two versions for a registered_model. v1 is a dummy model. v2 is a normal model.
      register_step_rm_name = "register_step_model_" + get_random_id()
      train_log_and_register_model(register_step_rm_name, is_dummy=True)
      train_log_and_register_model(register_step_rm_name)
  
      # Write v1 to the output directory of the register step
      register_step_output_dir = tmp_recipe_exec_path.joinpath(
          "steps", "register", "outputs"
      )
      register_step_output_dir.mkdir(parents=True)
      registered_model_info = RegisteredModelVersionInfo(
          name=register_step_rm_name, version=1
      )
      registered_model_info.to_json(
          path=str(register_step_output_dir / _REGISTERED_MV_INFO_FILE)
      )
  
      recipe_config = read_yaml(
          tmp_recipe_root_path, _RECIPE_CONFIG_FILE_NAME
      )
      recipe_config.update(
          {
              "model_registry": {"model_name": register_step_rm_name},
              "steps": {
                  "predict": {
                      "output": {
                          "using": "parquet",
                          "location": str(
                              predict_step_output_dir.joinpath(
                                  "output.parquet"
                              )
                          ),
                      }
                  },
              },
          }
      )
      predict_step = PredictStep.from_recipe_config(
          recipe_config,
          str(tmp_recipe_root_path),
      )
      predict_step.run(str(predict_step_output_dir))
  
      # These assertions will only pass if the dummy model was used for scoring
      prediction_assertions(
          predict_step_output_dir, "parquet", "output", spark_session
      )
  
imports: import os
  import tempfile
  from pathlib import Path
  from unittest import mock
  import pandas
  import pytest
  from pyspark.sql import SparkSession
  from sklearn.datasets import load_diabetes
  import mlflow
  from mlflow.exceptions import MlflowException
  from mlflow.recipes.artifacts import RegisteredModelVersionInfo
  from mlflow.recipes.steps.predict import _INPUT_FILE_NAME, _SCORED_OUTPUT_FILE_NAME, PredictStep
  from mlflow.recipes.steps.register import _REGISTERED_MV_INFO_FILE
  from mlflow.recipes.utils import _RECIPE_CONFIG_FILE_NAME
  from mlflow.utils.file_utils import read_yaml
  from tests.recipes.helper_functions import get_random_id, train_and_log_model, train_log_and_register_model
label_desc: Use image node_id 7 for calling a global function with example usage: test_predict_step_uses_register_step_output(tmp_recipe_root_path, tmp_recipe_exec_path, predict_step_output_dir, spark_session) without return types