code: def test_repartition_hash(by, npartitions, max_branch):
      npartitions_i = 4
      datarange = 26
      size = 100
      gdf = cudf.DataFrame(
          {
              "a": np.arange(0, stop=size, dtype="int64"),
              "b": np.random.randint(datarange, size=size),
              "c": np.random.choice(list("abcdefgh"), size=size),
              "d": np.random.choice(np.arange(26), size=size),
          }
      )
      gdf.d = gdf.d.astype("datetime64[ms]")
      ddf = dgd.from_cudf(gdf, npartitions=npartitions_i)
      ddf_new = ddf.shuffle(
          on=by,
          ignore_index=True,
          npartitions=npartitions,
          max_branch=max_branch,
      )
  
      # 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 27 for calling a global function with example usage: test_repartition_hash(by, npartitions, max_branch) without return types