code: def test_predict_throws_when_improperly_configured():
      for required_key in ["using", "location"]:
          recipe_config = {
              "steps": {
                  "predict": {
                      "output": {
                          "using": "parquet",
                          "location": "random/path",
                      },
                      "model_uri": "models:/taxi_fare_regressor/Production",
                  },
              },
          }
          recipe_config["steps"]["predict"]["output"].pop(required_key)
          predict_step = PredictStep.from_recipe_config(
              recipe_config=recipe_config,
              recipe_root=os.getcwd(),
          )
          with pytest.raises(
              MlflowException,
              match=f"The `{required_key}` configuration key must be specified",
          ):
              predict_step._validate_and_apply_step_config()
  
      predict_step = PredictStep.from_recipe_config(
          recipe_config={
              "steps": {
                  "predict": {
                      "output": {
                          "using": "fancy_format",
                          "location": "random/path",
                      },
                      "model_uri": "my model",
                  },
              },
          },
          recipe_root=os.getcwd(),
      )
      with pytest.raises(
          MlflowException,
          match="Invalid `using` in predict step configuration",
      ):
          predict_step._validate_and_apply_step_config()
  
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 11 for calling a global function with example usage: test_predict_throws_when_improperly_configured() without return types