code: def spark_session():
      with tempfile.TemporaryDirectory() as tmpdir:
          with (
              SparkSession.builder.master("local[*]")
              .config(
                  "spark.jars.packages",
                  "io.delta:delta-spark_2.12:3.0.0",
              )
              .config(
                  "spark.sql.extensions",
                  "io.delta.sql.DeltaSparkSessionExtension",
              )
              .config(
                  "spark.sql.catalog.spark_catalog",
                  "org.apache.spark.sql.delta.catalog.DeltaCatalog",
              )
              .config("spark.sql.warehouse.dir", str(tmpdir))
              .getOrCreate()
          ) as session:
              yield 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 1 for calling a global function with example usage: spark_session() without return types