def METHOD_NAME(self, X, y=None):
    result_y = None
    if y is not None:
        assert _is_pandas_df(y) or _is_pandas_series(
            y
        ), "transform_X_y is supported only when y is a Pandas Series or DataFrame."
        result_y = y.sort_index(
            ascending=self.ascending
        )  # assumes that y is always Pandas
    result_X = self.transform(X)
    return result_X, result_y