code: def test_onehot_random_inputs(
      client, drop, as_array, sparse, n_samples
  ):
      X, ary = generate_inputs_from_categories(
          n_samples=n_samples, as_array=as_array
      )
      if as_array:
          dX = da.from_array(X)
      else:
          dX = dask_cudf.from_cudf(X, npartitions=1)
  
      enc = OneHotEncoder(sparse=sparse, drop=drop, categories="auto")
      sk_enc = SkOneHotEncoder(
          sparse=sparse, drop=drop, categories="auto"
      )
      ohe = enc.fit_transform(dX)
      ref = sk_enc.fit_transform(ary)
      if sparse:
          cp.testing.assert_array_equal(
              ohe.compute().toarray(), ref.toarray()
          )
      else:
          cp.testing.assert_array_equal(ohe.compute(), ref)
  
      inv_ohe = enc.inverse_transform(ohe)
      assert_inverse_equal(inv_ohe.compute(), dX.compute())
  
file_path: cuml/python/cuml/tests/dask/test_dask_one_hot_encoder.py
imports: from cuml.internals.safe_imports import cpu_only_import_from
  from sklearn.preprocessing import OneHotEncoder
  from cuml.testing.utils import stress_param, generate_inputs_from_categories, assert_inverse_equal, from_df_to_numpy
  from cuml.dask.preprocessing import OneHotEncoder
  import dask.array
  from cuml.internals.safe_imports import cpu_only_import
  from cudf import DataFrame, Series
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 7 for calling a global function with example usage: test_onehot_random_inputs(client, drop, as_array, sparse, n_samples) without return types