<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fit_transform(self, X, y=None):
 """Fit OneHotEncoder to X, then transform X. Equivalent to self.fit(X).transform(X), but more convenient and more efficient. See fit for the parameters, transform for the return value. Parameters X : array-like or sparse matrix, shape=(n_samples, n_features) Dense array or sparse matrix. y: array-like {n_samples,} (Optional, ignored) Feature labels """

        if self.categorical_features == "auto":
            self.categorical_features = auto_select_categorical_features(X, threshold=self.threshold)

        return _transform_selected(
            X,
            self._fit_transform,
            self.categorical_features,
            copy=True
        )