code: def test_unknown_category_transform():
      df2 = ddf.copy()
      df2["A"] = ddf.A.cat.add_categories("new!")
  
      enc = dask_ml.preprocessing.OneHotEncoder()
      enc.fit(ddf)
  
      with pytest.raises(
          ValueError, match="Different CategoricalDtype"
      ):
          enc.transform(df2)
  
imports: import dask.array
  import dask.dataframe
  import numpy
  import packaging.version
  import pandas
  import pytest
  import scipy.sparse
  import sklearn.preprocessing
  import dask_ml.preprocessing
  from dask_ml._compat import DASK_2_20_0, PANDAS_VERSION
  from dask_ml.utils import assert_estimator_equal
label_desc: Use image node_id 8 for calling a global function with example usage: test_unknown_category_transform() without return types