code: def test_from_pandas_spark_datasource(spark_session, tmp_path):
      df = pd.DataFrame([[1, 2, 3], [1, 2, 3]], columns=["a", "b", "c"])
      df_spark = spark_session.createDataFrame(df)
      path = str(tmp_path / "temp.parquet")
      df_spark.write.parquet(path)
  
      spark_datasource = SparkDatasetSource(path=path)
      mlflow_df = mlflow.data.from_pandas(df, source=spark_datasource)
  
      assert isinstance(mlflow_df, PandasDataset)
      assert mlflow_df.df.equals(df)
      assert mlflow_df.schema == _infer_schema(df)
      assert mlflow_df.profile == {
          "num_rows": len(df),
          "num_elements": df.size,
      }
  
      assert isinstance(mlflow_df.source, SparkDatasetSource)
  
imports: import json
  import pandas
  import pytest
  import mlflow.data
  from mlflow.data.code_dataset_source import CodeDatasetSource
  from mlflow.data.delta_dataset_source import DeltaDatasetSource
  from mlflow.data.filesystem_dataset_source import FileSystemDatasetSource
  from mlflow.data.pandas_dataset import PandasDataset
  from mlflow.data.pyfunc_dataset_mixin import PyFuncInputsOutputs
  from mlflow.data.spark_dataset_source import SparkDatasetSource
  from mlflow.exceptions import MlflowException
  from mlflow.models.evaluation.base import EvaluationDataset
  from mlflow.types.schema import Schema
  from mlflow.types.utils import _infer_schema
  from tests.resources.data.dataset_source import TestDatasetSource
label_desc: Use image node_id 11 for calling a global function with example usage: test_from_pandas_spark_datasource(spark_session, tmp_path) without return types