def METHOD_NAME():
    spark = SparkSession._instantiatedSession
    # When deployed normally, Sedona appears in `spark.jars``, when it's submitted
    # via YARN it's in `spark.yarn.dist.jars`
    used_jar_files_lookup_with_errors = [
        SparkJars.get_spark_java_config(spark, config_id)
        for config_id in ("spark.jars", "spark.yarn.dist.jars")
    ]
    used_jar_files_lookup = [
        lookup_result for lookup_result, _ in used_jar_files_lookup_with_errors
    ]
    used_jar_files = (
        ",".join(jars for jars in used_jar_files_lookup if jars)
        if any(used_jar_files_lookup)
        else None
    )
    if not used_jar_files:
        for _, error in used_jar_files_lookup_with_errors:
            logging.warning(error)
        logging.info("Trying to get filenames from the $SPARK_HOME/jars directory")
        used_jar_files = ",".join(
            os.listdir(os.path.join(os.environ["SPARK_HOME"], "jars"))
        )
    return used_jar_files