code: def test_roundtrip_from_dask_partitioned(
      tmpdir, parts, daskcudf, metadata
  ):
      tmpdir = str(tmpdir)
  
      df = pd.DataFrame()
      df["year"] = [2018, 2019, 2019, 2019, 2020, 2021]
      df["month"] = [1, 2, 3, 3, 3, 2]
      df["day"] = [1, 1, 1, 2, 2, 1]
      df["data"] = [0, 0, 0, 0, 0, 0]
      df.index.name = "index"
      if daskcudf:
          ddf2 = dask_cudf.from_cudf(
              cudf.from_pandas(df), npartitions=2
          )
          ddf2.to_parquet(
              tmpdir, write_metadata_file=metadata, partition_on=parts
          )
      else:
          ddf2 = dd.from_pandas(df, npartitions=2)
          ddf2.to_parquet(
              tmpdir,
              engine="pyarrow",
              write_metadata_file=metadata,
              partition_on=parts,
          )
      df_read = dd.read_parquet(tmpdir, engine="pyarrow")
      gdf_read = dask_cudf.read_parquet(tmpdir)
  
      # TODO: Avoid column selection after `CudfEngine`
      # can be aligned with dask/dask#6534
      columns = list(df_read.columns)
      assert set(df_read.columns) == set(gdf_read.columns)
      dd.assert_eq(
          df_read.compute(scheduler=dask.get)[columns],
          gdf_read.compute(scheduler=dask.get)[columns],
      )
  
      assert gdf_read.index.name == "index"
  
      # Check that we don't have uuid4 file names
      for _, _, files in os.walk(tmpdir):
          for fn in files:
              if not fn.startswith("_"):
                  assert "part" in fn
  
      # Check that we can aggregate files by a partition name
      df_read = dd.read_parquet(
          tmpdir,
          engine="pyarrow",
          aggregate_files="year",
          split_row_groups=2,
      )
      gdf_read = dask_cudf.read_parquet(
          tmpdir, aggregate_files="year", split_row_groups=2
      )
      dd.assert_eq(df_read, gdf_read)
  
imports: import glob
  import math
  import os
  import numpy
  import pandas
  import pytest
  import dask
  from dask import dataframe
  from dask.utils import natural_sort_key
  import cudf
  import dask_cudf
label_desc: Use image node_id 16 for calling a global function with example usage: test_roundtrip_from_dask_partitioned(tmpdir, parts, daskcudf, metadata) without return types