code: def test_get_source_obtains_expected_file_source(tmp_path):
      df = pd.DataFrame([[1, 2, 3], [1, 2, 3]], columns=["a", "b", "c"])
      path = tmp_path / "temp.csv"
      df.to_csv(path)
      pandas_ds = mlflow.data.from_pandas(df, source=path)
  
      source1 = mlflow.data.get_source(pandas_ds)
      assert json.loads(source1.to_json()) == json.loads(
          pandas_ds.source.to_json()
      )
  
      with mlflow.start_run() as r:
          mlflow.log_input(pandas_ds)
  
      run = mlflow.get_run(r.info.run_id)
  
      ds_input = run.inputs.dataset_inputs[0]
      source2 = mlflow.data.get_source(ds_input)
      assert json.loads(source2.to_json()) == json.loads(
          pandas_ds.source.to_json()
      )
  
      ds_entity = run.inputs.dataset_inputs[0].dataset
      source3 = mlflow.data.get_source(ds_entity)
      assert json.loads(source3.to_json()) == json.loads(
          pandas_ds.source.to_json()
      )
  
      assert (
          source1.load()
          == source2.load()
          == source3.load()
          == str(path)
      )
  
file_path: mlflow/tests/data/test_dataset_source.py
imports: import json
  import pandas
  import pytest
  import mlflow.data
  from mlflow.exceptions import MlflowException
  from tests.resources.data.dataset_source import TestDatasetSource
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_source_obtains_expected_file_source(tmp_path) without return types