@contextlib.contextmanager
def record_timing(metrics, key):
    '\n    Set timings[key] equal to the run time (in milliseconds) of the context body.\n    '
    t0 = time.perf_counter()
    (yield)
    metrics[key]['dur'] += (time.perf_counter() - t0)
Set timings[key] equal to the run time (in milliseconds) of the context body.
@contextlib.contextmanager
def record_timing(metrics, key):
    '\n    \n    '
    t0 = time.perf_counter()
    (yield)
    metrics[key]['dur'] += (time.perf_counter() - t0)