code: def test_handle_unknown(client, as_array: bool) -> None:
      X = DataFrame({"data": [0, 1]})
      Y = DataFrame({"data": [3, 1]})
  
      X = dask_cudf.from_cudf(X, npartitions=2)
      Y = dask_cudf.from_cudf(Y, npartitions=2)
  
      if as_array:
          X = X.values
          Y = Y.values
  
      enc = OrdinalEncoder(handle_unknown="error")
      enc = enc.fit(X)
      with pytest.raises(KeyError):
          enc.transform(Y).compute()
  
      enc = OrdinalEncoder(handle_unknown="ignore")
      enc = enc.fit(X)
      encoded = enc.transform(Y).compute()
      if as_array:
          np.isnan(encoded[0, 0])
      else:
          assert pd.isna(encoded.iloc[0, 0])
  
file_path: cuml/python/cuml/tests/dask/test_dask_ordinal_encoder.py
imports: import cupy
  import dask_cudf
  import numpy
  import pandas
  import pytest
  from cudf import DataFrame
  from cuml.dask.preprocessing import OrdinalEncoder
  from distributed import Client
label_desc: Use image node_id 3 for calling a global function with example usage: test_handle_unknown(client, as_array) without return types