def infer_bg_func(background_params):
    """Infers which background function was used, from parameters.

    Parameters
    ----------
    background_params : list of float
        Parameters that describe the background of a power spectrum.

    Returns
    -------
    background_mode : {'fixed', 'knee'}
        Which kind of background process parameters are consistent with.
    """

    if len(background_params) == 2:
        background_mode = 'fixed'
    elif len(background_params) == 3:
        background_mode = 'knee'
    else:
        raise ValueError('Background parameters not consistent with any available option.')

    return background_mode