code: def _fit_sklearn(pandas_df):
      x = pandas_df.values
      y = np.array([4] * len(x))
      LinearRegression().fit(x, y)
      # Sleep to allow time for datasource read event to fire asynchronously from the JVM & for
      # the Python-side event handler to run & log a tag to the current active run.
      # This race condition (& the risk of dropping datasource read events for short-lived runs)
      # is known and documented in
      # https://mlflow.org/docs/latest/python_api/mlflow.spark.html#mlflow.spark.autolog
      time.sleep(5)
  
file_path: mlflow/tests/spark/autologging/datasource/test_spark_datasource_autologging_crossframework.py
imports: import time
  import numpy
  import pytest
  from sklearn.linear_model import LinearRegression
  import mlflow
  import mlflow.spark
  from tests.spark.autologging.utils import _assert_spark_data_logged
label_desc: Use image node_id 2 for calling a global function with example usage: _fit_sklearn(pandas_df) without return types