code: def create_preprocessor(
      impute_strategy,
      max_category_levels,
      unique_category_str,
      continuous_features,
      skewed_features,
      onehot_features,
      embed_features,
      bool_features,
  ):
      """Creates sklearn ColumnTransformer that can be fit to training data to preprocess it for tabular neural network."""
      transformers = (
          []
      )  # order of various column transformers in this list is important!
      if continuous_features:
          continuous_transformer = Pipeline(
              steps=[
                  ("imputer", SimpleImputer(strategy=impute_strategy)),
                  ("scaler", StandardScaler()),
              ]
          )
          transformers.append(
              (
                  "continuous",
                  continuous_transformer,
                  continuous_features,
              )
          )
      if skewed_features:
          power_transformer = Pipeline(
              steps=[
                  ("imputer", SimpleImputer(strategy=impute_strategy)),
                  (
                      "quantile",
                      QuantileTransformer(output_distribution="normal"),
                  ),
              ]
          )  # Or output_distribution = 'uniform'
          transformers.append(
              ("skewed", power_transformer, skewed_features)
          )
      if onehot_features:
          onehot_transformer = Pipeline(
              steps=[
                  (
                      "onehot",
                      OneHotMergeRaresHandleUnknownEncoder(
                          max_levels=max_category_levels, sparse=False
                      ),
                  )
              ]
          )  # test-time unknown values will be encoded as all zeros vector
          transformers.append(
              ("onehot", onehot_transformer, onehot_features)
          )
      if (
          embed_features
      ):  # Ordinal transformer applied to convert to-be-embedded categorical features to integer levels
          ordinal_transformer = Pipeline(
              steps=[
                  (
                      "ordinal",
                      OrdinalMergeRaresHandleUnknownEncoder(
                          max_levels=max_category_levels
                      ),
                  )
              ]
          )  # returns 0-n when max_category_levels = n-1. category n is reserved for unknown test-time categories.
          transformers.append(
              ("ordinal", ordinal_transformer, embed_features)
          )
      return ColumnTransformer(
          transformers=transformers, remainder="passthrough"
      )
  
file_path: autogluon/tabular/src/autogluon/tabular/models/tabular_nn/utils/data_preprocessor.py
imports: from collections import OrderedDict
  from sklearn.compose import ColumnTransformer
  from sklearn.impute import SimpleImputer
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import FunctionTransformer, QuantileTransformer, StandardScaler
  from .categorical_encoders import OneHotMergeRaresHandleUnknownEncoder, OrdinalMergeRaresHandleUnknownEncoder
label_desc: Use image node_id 1 for calling a global function with example usage: create_preprocessor(impute_strategy, max_category_levels, unique_category_str, continuous_features, skewed_features, onehot_features, embed_features, bool_features) and returns: ColumnTransformer