code: def test_repartition_hash_staged(npartitions):
      by = ["b"]
      datarange = 35
      size = 100
      gdf = cudf.DataFrame(
          {
              "a": np.arange(size, dtype="int64"),
              "b": np.random.randint(datarange, size=size),
          }
      )
      # WARNING: Specific npartitions-max_branch combination
      # was specifically chosen to cover changes in #4676
      npartitions_initial = 17
      ddf = dgd.from_cudf(gdf, npartitions=npartitions_initial)
      ddf_new = ddf.shuffle(
          on=by,
          ignore_index=True,
          npartitions=npartitions,
          max_branch=4,
      )
  
      # Make sure we are getting a dask_cudf dataframe
      assert type(ddf_new) == type(ddf)
  
      # Check that the length was preserved
      assert len(ddf_new) == len(ddf)
  
      # Check that the partitions have unique keys,
      # and that the key values are preserved
      expect_unique = gdf[by].drop_duplicates().sort_values(by)
      got_unique = cudf.concat(
          [
              part[by].compute().drop_duplicates()
              for part in ddf_new[by].partitions
          ],
          ignore_index=True,
      ).sort_values(by)
      dd.assert_eq(got_unique, expect_unique, check_index=False)
  
imports: import random
  import cupy
  import numpy
  import pandas
  import pytest
  from packaging import version
  import dask
  from dask import dataframe
  from dask.dataframe.core import make_meta, meta_nonempty
  from dask.utils import M
  import cudf
  import dask_cudf
label_desc: Use image node_id 26 for calling a global function with example usage: test_repartition_hash_staged(npartitions) without return types