code: def transform(self, X):
          
          X = check_array(X)
          X_transformed = np.copy(X)
          # add class probabilities as a synthetic feature
          if issubclass(self.estimator.__class__, ClassifierMixin) and hasattr(self.estimator, 'predict_proba'):
              X_transformed = np.hstack((self.estimator.predict_proba(X), X))
  
          # add class prodiction as a synthetic feature
          X_transformed = np.hstack((np.reshape(self.estimator.predict(X), (-1, 1)), X_transformed))
  
          return X_transformed
docs: Transform data by adding two synthetic feature(s).
  
          Parameters
          ----------
          X: numpy ndarray, {n_samples, n_components}
              New data, where n_samples is the number of samples and n_components is the number of components.
  
          Returns
          -------
          X_transformed: array-like, shape (n_samples, n_features + 1) or (n_samples, n_features + 1 + n_classes) for classifier with predict_proba attribute
              The transformed feature set.