def is_close(a, b, rel_tol=1e-09, abs_tol=0.0):
    """
    See PEP 485, added here for legacy versions.

    >>> is_close(0.0, 0.0)
    True
    >>> is_close(1, 1.0)
    True
    >>> is_close(0.01, 0.001)
    False
    >>> is_close(0.0001001, 0.0001, rel_tol=1e-02)
    True
    >>> is_close(0.0001001, 0.0001)
    False

    @param a: An int or float.
    @param b: An int or float.
    @param rel_tol: Relative tolerance - maximumed allow difference between two numbers.
    @param abs_tol: Absolute tolerance - minimum absolute tolerance.
    @return: True if the values a and b are close.

    """
    return abs(a - b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)
