def METHOD_NAME(
    self,
    df: pd.DataFrame,
    *,
    ancillary: Optional[pd.DataFrame] = None,
    p: float = 0.5,
    conditional_after: Optional[np.array] = None
) -> pd.Series:
    """
    Returns the median lifetimes for the individuals, by default. If the survival curve of an
    individual does not cross 0.5, then the result is infinity.
    http://stats.stackexchange.com/questions/102986/percentile-loss-functions
    Parameters
    ----------
    df:  DataFrame
        a (n,d)  DataFrame. If a DataFrame, columns
        can be in any order. If a numpy array, columns must be in the
        same order as the training data.
    ancillary: DataFrame, optional
        a (n,d) DataFrame. If a DataFrame, columns
        can be in any order. If a numpy array, columns must be in the
        same order as the training data.
    p: float, optional (default=0.5)
        the percentile, must be between 0 and 1.
    Returns
    -------
    percentiles: DataFrame
    See Also
    --------
    predict_median, predict_expectation
    """
    lambda_, rho_ = self._prep_inputs_for_prediction_and_return_scores(df, ancillary)
    if conditional_after is None and len(df.shape) == 2:
        conditional_after = np.zeros(df.shape[0])
    elif conditional_after is None and len(df.shape) == 1:
        conditional_after = np.zeros(1)
    return pd.Series(
        lambda_ * np.power(-np.log(p) + (conditional_after / lambda_) ** rho_, 1 / rho_) - conditional_after,
        index=_get_index(df),
    )