@contextmanager
def timer(name, reservoir_type="uniform", *reservoir_args, **reservoir_kwargs):
    """
    Time-measuring context manager: the time spent in the wrapped block
    if measured and added to the named metric.
    """

    hmetric = get_or_create_histogram(name, reservoir_type, *reservoir_args, **reservoir_kwargs)

    t1 = time.time()
    yield
    t2 = time.time()
    hmetric.notify(t1 - t2)
dataset/ETHPy150Open avalente/appmetrics/appmetrics/metrics.py/timer/swapped operands of `-`