code: def test_to_pandas(spark):
      df = spark.range(100)
      ds = ray.data.from_spark(df)
      pdf = ds.to_pandas()
      pdf2 = df.toPandas()
      pandas.testing.assert_frame_equal(pdf, pdf2)
  
file_path: ray/python/ray/data/tests/test_raydp.py
imports: import pandas
  import pytest
  import raydp
  import torch
  import ray
  from ray.data.tests.conftest import *
  from ray.data.tests.test_execution_optimizer import _check_usage_record
label_desc: Use image node_id 6 for calling a global function with example usage: test_to_pandas(spark) without return types