'Private function to transform a single feature'

def _transform_col(self, X_col, quantiles, inverse):

    if (self.output_distribution == 'normal'):
        output_distribution = 'norm'
    else:
        output_distribution = self.output_distribution
    output_distribution = getattr(stats, output_distribution)
    if (not inverse):
        lower_bound_x = quantiles[0]
        upper_bound_x = quantiles[(-1)]
        lower_bound_y = 0
        upper_bound_y = 1
    else:
        lower_bound_x = 0
        upper_bound_x = 1
        lower_bound_y = quantiles[0]
        upper_bound_y = quantiles[(-1)]
        X_col = output_distribution.cdf(X_col)
    lower_bounds_idx = ((X_col - BOUNDS_THRESHOLD) < lower_bound_x)
    upper_bounds_idx = ((X_col + BOUNDS_THRESHOLD) > upper_bound_x)
    if (not inverse):
        X_col = (0.5 * (np.interp(X_col, quantiles, self.references_) - np.interp((- X_col), (- quantiles[::(-1)]), (- self.references_[::(-1)]))))
    else:
        X_col = np.interp(X_col, self.references_, quantiles)
    X_col[upper_bounds_idx] = upper_bound_y
    X_col[lower_bounds_idx] = lower_bound_y
    if (not inverse):
        X_col = output_distribution.ppf(X_col)
        clip_min = output_distribution.ppf((BOUNDS_THRESHOLD - np.spacing(1)))
        clip_max = output_distribution.ppf((1 - (BOUNDS_THRESHOLD - np.spacing(1))))
        X_col = np.clip(X_col, clip_min, clip_max)
    return X_col
