code: def test_spark_udf_spark_connect(spark, tmp_path):
      X, y = load_iris(return_X_y=True)
      model = LogisticRegression().fit(X, y)
      mlflow.sklearn.save_model(model, tmp_path)
      sdf = spark.createDataFrame(pd.DataFrame(X, columns=list("abcd")))
      udf = mlflow.pyfunc.spark_udf(
          spark, str(tmp_path), env_manager="local"
      )
      result = sdf.select(udf(*sdf.columns).alias("preds")).toPandas()
      np.testing.assert_almost_equal(
          result["preds"].to_numpy(), model.predict(X)
      )
  
file_path: mlflow/tests/pyfunc/test_spark_connect.py
imports: import numpy
  import pandas
  import pyspark
  import pytest
  from pyspark.sql import SparkSession
  from sklearn.datasets import load_iris
  from sklearn.linear_model import LogisticRegression
  import mlflow
label_desc: Use image node_id 2 for calling a global function with example usage: test_spark_udf_spark_connect(spark, tmp_path) without return types