code: def test_universal_autolog_calls_pyspark_immediately_in_databricks():
      with mock.patch(
          "mlflow.tracking.fluent.is_in_databricks_runtime",
          return_value=True,
      ):
          mlflow.autolog()
          assert not autologging_is_disabled(mlflow.spark.FLAVOR_NAME)
  
          mlflow.autolog(disable=True)
          assert autologging_is_disabled(mlflow.spark.FLAVOR_NAME)
  
          mlflow.autolog(disable=False)
          assert not autologging_is_disabled(mlflow.spark.FLAVOR_NAME)
  
          with mock.patch(
              "mlflow.spark.autolog", wraps=mlflow.spark.autolog
          ) as autolog_mock:
              # there should be no import hook on pyspark since autologging was already
              # applied to an active spark session
              mlflow.utils.import_hooks.notify_module_loaded(pyspark)
              autolog_mock.assert_not_called()
  
imports: import sys
  from collections import namedtuple
  from io import StringIO
  from unittest import mock
  import fastai
  import lightgbm
  import pyspark
  import pyspark.ml
  import pytest
  import pytorch_lightning
  import setfit
  import sklearn
  import statsmodels
  import tensorflow
  import transformers
  import xgboost
  import mlflow
  from mlflow.utils.autologging_utils import AutologgingEventLogger, autologging_is_disabled, get_autologging_config
  from tests.autologging.fixtures import reset_stderr, test_mode_off, test_mode_on
label_desc: Use image node_id 7 for calling a global function with example usage: test_universal_autolog_calls_pyspark_immediately_in_databricks() without return types