code: def test_fit_transform(self):
      X = np.array([[1, 2, 1], [3, 1, 1], [2, 9, np.nan]])
      Y = np.array(
          [
              [1, 0, 0, 0, 1, 0, 0, 1],
              [0, 0, 1, 1, 0, 0, 0, 1],
              [0, 1, 0, 0, 0, 1, 1, 0],
          ]
      )
      # dense input
      # Notice the X.copy() here as the imputation
      # is in place to save resources
      Yt = CategoricalPreprocessingPipeline().fit_transform(X.copy())
      np.testing.assert_array_equal(Yt, Y)
      # sparse input
      X_sparse = sparse.csc_matrix(X)
      Yt = CategoricalPreprocessingPipeline().fit_transform(X_sparse)
      Yt = Yt.todense()
      np.testing.assert_array_equal(Yt, Y)
  
file_path: auto-sklearn/test/test_pipeline/components/data_preprocessing/test_data_preprocessing_categorical.py
imports: import numpy
  from scipy import sparse
  from autosklearn.pipeline.components.data_preprocessing.feature_type_categorical import CategoricalPreprocessingPipeline
  import pytest
  import unittest
label_desc: Use image node_id 2 for calling the CategoricalPreprocessingPipelineTest obj's underlying member method code with example usage: obj.test_fit_transform() without return types