def about(value, tolerance):
    """Create an object that can be compared against a number and allows a tolerance."""

    class Comparator:
        """A helper class to compare against a value with a tolerance."""

        def __le__(self, other):
            return other >= value - tolerance

        def __eq__(self, other):
            return value - tolerance <= other <= value + tolerance

        def __ge__(self, other):
            return other <= value + tolerance

        def __ne__(self, other):
            return not self.__eq__(other)

        def __repr__(self):
            return f"<{value} +- {tolerance}>"

    return Comparator()