class_docstr: This component is used to apply distinct transformations to categorical,
  numerical and text features of a dataset. It is built on top of sklearn's
  ColumnTransformer.
class_docstr_tok: ["This","component","is","used","to","apply","distinct","transformations","to","categorical",",","numerical","and","text","features","of","a","dataset",".","It","is","built","on","top","of","sklearn's","ColumnTransformer","."]
code: def fit(
      self,
      X: SUPPORTED_FEAT_TYPES,
      y: Optional[SUPPORTED_TARGET_TYPES] = None,
  ) -> "FeatTypeSplit":
      n_feats = X.shape[1]
      if self.feat_type is not None:
          # Make sure that we are not missing any column!
          expected = set(self.feat_type.keys())
          if hasattr(X, "columns"):
              columns = set(X.columns)
          else:
              columns = set(range(n_feats))
          if expected != columns:
              raise ValueError(
                  f"Train data has columns={expected} yet the"
                  f" feat_types are feat={columns}"
              )
          sklearn_transf_spec = []
  
          categorical_features = [
              key
              for key, value in self.feat_type.items()
              if value.lower() == "categorical"
          ]
          if len(categorical_features) > 0:
              sklearn_transf_spec.append(
                  (
                      "categorical_transformer",
                      self.categ_ppl,
                      categorical_features,
                  )
              )
  
          numerical_features = [
              key
              for key, value in self.feat_type.items()
              if value.lower() == "numerical"
          ]
          if len(numerical_features) > 0:
              sklearn_transf_spec.append(
                  (
                      "numerical_transformer",
                      self.numer_ppl,
                      numerical_features,
                  )
              )
  
          text_features = [
              key
              for key, value in self.feat_type.items()
              if value.lower() == "string"
          ]
          if len(text_features) > 0:
              sklearn_transf_spec.append(
                  ("text_transformer", self.txt_ppl, text_features)
              )
      else:
          # self.feature_type == None assumes numerical case
          sklearn_transf_spec = [
              (
                  "numerical_transformer",
                  self.numer_ppl,
                  [True] * n_feats,
              )
          ]
  
      # And one last check in case feat type is None
      # And to make sure the final specification has all the columns
      # considered in the column transformer
      total_columns = sum(
          [len(features) for name, ppl, features in sklearn_transf_spec]
      )
      if total_columns != n_feats:
          raise ValueError(
              "Missing columns in the specification of the data validator"
              f" for train data={np.shape(X)} and spec={sklearn_transf_spec}"
          )
  
      self.sparse_ = sparse.issparse(X) or self.force_sparse_output
      self.column_transformer = sklearn.compose.ColumnTransformer(
          transformers=sklearn_transf_spec,
          sparse_threshold=float(self.sparse_),
      )
      self.column_transformer.fit(X, y)
      return self
  
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import sklearn.compose
  from ConfigSpace import Configuration
  from ConfigSpace.configuration_space import ConfigurationSpace
  from scipy import sparse
  from sklearn.base import BaseEstimator
  from autosklearn.askl_typing import FEAT_TYPE_TYPE
  from autosklearn.data.validation import SUPPORTED_FEAT_TYPES, SUPPORTED_TARGET_TYPES
  from autosklearn.pipeline.base import DATASET_PROPERTIES_TYPE, PIPELINE_DATA_DTYPE, BasePipeline
  from autosklearn.pipeline.components.base import AutoSklearnChoice, AutoSklearnComponent, AutoSklearnPreprocessingAlgorithm
  from autosklearn.pipeline.components.data_preprocessing.feature_type_categorical import CategoricalPreprocessingPipeline
  from autosklearn.pipeline.components.data_preprocessing.feature_type_numerical import NumericalPreprocessingPipeline
  from autosklearn.pipeline.components.data_preprocessing.feature_type_text import TextPreprocessingPipeline
  from autosklearn.pipeline.constants import DENSE, INPUT, SPARSE, UNSIGNED_DATA
label_desc: Use image node_id 2 for calling the FeatTypeSplit obj's underlying member method code with example usage: obj.fit(X, y) and returns: self