code: def test_onehot_inverse_transform_handle_unknown(as_array):
      X = DataFrame({"chars": ["a", "b"], "int": [0, 2]})
      Y_ohe = cp.array([[0.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 1.0]])
      ref = DataFrame({"chars": [None, "b"], "int": [0, 2]})
      if as_array:
          X = _from_df_to_cupy(X)
          ref = DataFrame({0: [None, ord("b")], 1: [0, 2]})
  
      enc = OneHotEncoder(handle_unknown="ignore")
      enc = enc.fit(X)
      df = enc.inverse_transform(Y_ohe)
      assert_inverse_equal(df, ref)
  
imports: from sklearn.preprocessing import OneHotEncoder
  from cuml.testing.utils import stress_param, from_df_to_numpy, assert_inverse_equal, generate_inputs_from_categories
  from cuml.preprocessing import OneHotEncoder
  from cuml.internals.safe_imports import gpu_only_import_from
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
  import math
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 8 for calling a global function with example usage: test_onehot_inverse_transform_handle_unknown(as_array) without return types