def METHOD_NAME(self, datasets):
    """Perform the alternative hypothesis testing
    Parameters
    ----------
    datasets : `~gammapy.datasets.Datasets`
        Datasets
    Returns
    -------
    result : dict
        Dict with the TS of the best fit value compared to the null hypothesis
        and fit results for the two hypotheses. Entries are:
            * "ts" : fit statistic difference with null hypothesis
            * "fit_results" : results for the best fit
            * "fit_results_null" : fit results for the null hypothesis
    """
    for p in self.parameters:
        p.frozen = False
    fit_results = self.fit.METHOD_NAME(datasets)
    object_cache = [p.__dict__ for p in datasets.models.parameters]
    prev_pars = [p.value for p in datasets.models.parameters]
    stat = datasets.stat_sum()
    for p, val in zip(self.parameters, self.null_values):
        if isinstance(val, Parameter):
            p.__dict__ = val.__dict__
        else:
            p.value = val
            p.frozen = True
    fit_results_null = self.fit.METHOD_NAME(datasets)
    stat_null = datasets.stat_sum()
    ts = stat_null - stat
    if ts > self.ts_threshold:
        # restore default model if preferred against null hypothesis
        for p in self.parameters:
            p.frozen = False
        for kp, p in enumerate(datasets.models.parameters):
            p.__dict__ = object_cache[kp]
            p.value = prev_pars[kp]
    return dict(
        ts=ts,
        fit_results=fit_results,
        fit_results_null=fit_results_null,
    )