code: def test_get_dummies_cat():
      df = pd.DataFrame({"C": [], "A": []})
      ddf = dd.from_pandas(df, npartitions=10)
      dd.assert_eq(dd.get_dummies(ddf).compute(), pd.get_dummies(df))
      gdf = cudf.from_pandas(df)
      gddf = dask_cudf.from_cudf(gdf, npartitions=10)
      dd.assert_eq(
          dd.get_dummies(ddf).compute(),
          dd.get_dummies(gddf).compute(),
          check_dtype=False,
      )
  
      df = pd.DataFrame(
          {"A": ["a", "b", "c", "a", "z"], "C": [1, 2, 3, 4, 5]}
      )
      df["B"] = df["A"].astype("category")
      df["A"] = df["A"].astype("category")
      ddf = dd.from_pandas(df, npartitions=10)
      dd.assert_eq(dd.get_dummies(ddf).compute(), pd.get_dummies(df))
      gdf = cudf.from_pandas(df)
      gddf = dask_cudf.from_cudf(gdf, npartitions=10)
      dd.assert_eq(
          dd.get_dummies(ddf).compute(),
          dd.get_dummies(gddf).compute(),
          check_dtype=False,
      )
  
      df = pd.DataFrame(
          {
              "A": ["a", "b", "c", "a", "z"],
              "C": pd.Series([1, 2, 3, 4, 5], dtype="category"),
          }
      )
      df["B"] = df["A"].astype("category")
      df["A"] = df["A"].astype("category")
      ddf = dd.from_pandas(df, npartitions=10)
      dd.assert_eq(dd.get_dummies(ddf).compute(), pd.get_dummies(df))
      gdf = cudf.from_pandas(df)
      gddf = dask_cudf.from_cudf(gdf, npartitions=10)
      dd.assert_eq(
          dd.get_dummies(ddf).compute(),
          dd.get_dummies(gddf).compute(),
          check_dtype=False,
      )
  
file_path: cudf/python/dask_cudf/dask_cudf/tests/test_onehot.py
imports: import pandas
  import pytest
  from dask import dataframe
  import cudf
  import dask_cudf
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_dummies_cat() without return types