code: def _apply_type_hints(X, type_hints):
      if type_hints is not None:
          # use type hints to convert columns
          # to possibly avoid some work.
          # means we need to copy X though.
          X = X.copy()
          for k, v in type_hints.items():
              if v == "continuous":
                  X[k] = X[k].astype(float)
              elif v == "categorical":
                  X[k] = X[k].astype("category")
              elif v == "useless" and k in X.columns:
                  X = X.drop(k, axis=1)
      return X
  
imports: from importlib.metadata import version
  from joblib import hash
  import warnings
  from warnings import warn
  import numpy
  import pandas
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.compose import make_column_transformer, ColumnTransformer
  from sklearn.impute import SimpleImputer
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import OneHotEncoder, StandardScaler
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 13 for calling a global function with example usage: _apply_type_hints(X, type_hints) and returns: X