code: def test_raydp_roundtrip(spark):
      spark_df = spark.createDataFrame(
          [(1, "a"), (2, "b"), (3, "c")], ["one", "two"]
      )
      rows = [(r.one, r.two) for r in spark_df.take(3)]
      ds = ray.data.from_spark(spark_df)
      values = [(r["one"], r["two"]) for r in ds.take(6)]
      assert values == rows
      df = ds.to_spark(spark)
      rows_2 = [(r.one, r.two) for r in df.take(3)]
      assert values == rows_2
  
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 2 for calling a global function with example usage: test_raydp_roundtrip(spark) without return types