code: def mock_spark_session():
      with mock.patch(
          "airflow.providers.apache.spark.hooks.spark_jdbc_script.SparkSession"
      ) as mok:
          yield mok
  
file_path: airflow/tests/providers/apache/spark/hooks/test_spark_jdbc_script.py
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from pyspark.sql.readwriter import DataFrameReader, DataFrameWriter
  from airflow.providers.apache.spark.hooks.spark_jdbc_script import SPARK_READ_FROM_JDBC, SPARK_WRITE_TO_JDBC, _create_spark_session, _parse_arguments, _run_spark, spark_read_from_jdbc, spark_write_to_jdbc
label_desc: Use image node_id 1 for calling a global function with example usage: mock_spark_session() without return types