code: def spark_session(tmp_path):
      from pyspark.sql import SparkSession
  
      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(tmp_path))
          .getOrCreate()
      ) as session:
          yield session
  
imports: import json
  import os
  import pandas
  import pytest
  import mlflow.data
  from mlflow.data.code_dataset_source import CodeDatasetSource
  from mlflow.data.delta_dataset_source import DeltaDatasetSource
  from mlflow.data.spark_dataset import SparkDataset
  from mlflow.data.spark_dataset_source import SparkDatasetSource
  from mlflow.exceptions import MlflowException
  from mlflow.models.evaluation.base import EvaluationDataset
  from mlflow.types.schema import Schema
  from mlflow.types.utils import _infer_schema
label_desc: Use image node_id 1 for calling a global function with example usage: spark_session(tmp_path) without return types