<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def block(*, name = None, metric = call_default, count = 1):
 """Context manager to measure execution time of a block :arg function metric: f(name, 1, time) :arg str name: name for the metric :arg int count: user-supplied number of items, defaults to 1 """

    t = time.time()
    try:
        yield
    finally:
        metric(name, count, time.time() - t)