def lim_growth(x, s, b0, k):
    """
    Function for limited growth. Used in several fits, thus it is implemented
    here as a raw function, which can be used in closures, inlining etc.

    Parameters
    ----------
    x : float, int, np.ndarray
        x values of the growth function.
    s : float, optional
        Limit of the growth function.
    b0 : float, optional
        Starting value. Values of 0 are **NOT RECOMMENDED**.
    k : float, optional
        Curvature parameter.

    Returns
    -------
    float, np.ndarray
        Value at point `x`.

    """
    return s - (s - b0) * k ** x