class_docstr: Class for creating and destroying SparkSession.
class_docstr_tok: ["Class","for","creating","and","destroying","SparkSession","."]
code: def tear_down_spark(spark: SparkSession) -> None:  # noqa: D102
      spark.stop()
      # To avoid Akka rebinding to the same port, since it doesn't unbind
      # immediately on shutdown
      spark._jvm.System.clearProperty("spark.driver.port")
  
file_path: quinn/quinn/spark.py
imports: from __future__ import annotations
  import logging
  import os
  from pyspark import SparkConf
  from pyspark.sql import SparkSession
label_desc: Use image node_id 4 for calling the SparkProvider obj's underlying member method code with example usage: obj.tear_down_spark(spark) without return types