code: def test_roundtrip_parquet_dask_to_spark(
      spark_session, npartitions, tmpdir, engine
  ):
      tmpdir = str(tmpdir)
      ddf = dd.from_pandas(pdf, npartitions=npartitions)
  
      # Papercut: https://github.com/dask/fastparquet/issues/646#issuecomment-885614324
      kwargs = {"times": "int96"} if engine == "fastparquet" else {}
  
      ddf.to_parquet(tmpdir, engine=engine, write_index=False, **kwargs)
  
      sdf = spark_session.read.parquet(tmpdir)
      sdf = sdf.toPandas()
  
      # Papercut: pandas TZ localization doesn't survive roundtrip
      sdf = sdf.assign(timestamp=sdf.timestamp.dt.tz_localize("UTC"))
  
      assert_eq(sdf, ddf, check_index=False)
  
file_path: dask/dask/tests/test_spark_compat.py
imports: from __future__ import annotations
  import decimal
  import signal
  import sys
  import threading
  import pytest
  from dask.datasets import timeseries
  import numpy
  import pandas
  from dask.dataframe._compat import PANDAS_GE_150, PANDAS_GE_200
  from dask.dataframe.utils import assert_eq
label_desc: Use image node_id 5 for calling a global function with example usage: test_roundtrip_parquet_dask_to_spark(spark_session, npartitions, tmpdir, engine) without return types