def _lin_fun(x, x0=0, y0=0, slope=1):
    """
    Return the function value of a linear function y = (x - x0) * slope + y0.

    Note
    ----
    y0 is value at x0
    """
    return (x - x0) * slope + y0