code: def _test_preprocessing_dtype(
      self,
      Preprocessor,
      add_NaNs=False,
      test_sparse=True,
      dataset="iris",
  ):
      # Dense
      # np.float32
      X_train, Y_train, X_test, Y_test = get_dataset(
          dataset, add_NaNs=add_NaNs
      )
      self.assertEqual(X_train.dtype, np.float32)
  
      configuration_space = (
          Preprocessor.get_hyperparameter_search_space()
      )
      default_config = configuration_space.get_default_configuration()
      preprocessor = Preprocessor(random_state=0, **default_config)
  
      preprocessor.fit(X_train, Y_train)
      preprocessor.transform(X_train)
      # self.assertEqual(Xt.dtype, np.float32)
  
      # np.float64
      X_train, Y_train, X_test, Y_test = get_dataset(
          dataset, add_NaNs=add_NaNs
      )
      X_train = X_train.astype(np.float64)
      configuration_space = (
          Preprocessor.get_hyperparameter_search_space()
      )
      default_config = configuration_space.get_default_configuration()
  
      preprocessor = Preprocessor(random_state=0, **default_config)
      preprocessor.fit(X_train, Y_train)
      preprocessor.transform(X_train)
      # self.assertEqual(Xt.dtype, np.float64)
  
      if test_sparse is True:
          # Sparse
          # np.float32
          X_train, Y_train, X_test, Y_test = get_dataset(
              dataset, make_sparse=True, add_NaNs=add_NaNs
          )
          self.assertEqual(X_train.dtype, np.float32)
          configuration_space = (
              Preprocessor.get_hyperparameter_search_space()
          )
          default_config = (
              configuration_space.get_default_configuration()
          )
          preprocessor = Preprocessor(random_state=0, **default_config)
  
          preprocessor.fit(X_train, Y_train)
          preprocessor.transform(X_train)
          # self.assertEqual(Xt.dtype, np.float32)
  
          # np.float64
          X_train, Y_train, X_test, Y_test = get_dataset(
              dataset, make_sparse=True, add_NaNs=add_NaNs
          )
          X_train = X_train.astype(np.float64)
          configuration_space = (
              Preprocessor.get_hyperparameter_search_space()
          )
          default_config = (
              configuration_space.get_default_configuration()
          )
  
          preprocessor = Preprocessor(random_state=0, **default_config)
          preprocessor.fit(X_train, Y_train)
          preprocessor.transform(X_train)
  
imports: import importlib
  import inspect
  import os
  import pkgutil
  import numpy
  import scipy.sparse
  import sklearn
  import sklearn.base
  import sklearn.datasets
  import unittest
label_desc: Use image node_id 1 for calling the PreprocessingTestCase obj's underlying member method code with example usage: obj._test_preprocessing_dtype(Preprocessor, add_NaNs, test_sparse, dataset) without return types