<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def all(iterable = None, *, name = None, metric = call_default):
 """Measure total time and item count for consuming an iterable :arg iterable: any iterable :arg function metric: f(name, count, total_time) :arg str name: name for the metric """

    if iterable is None:
        return _iter_decorator(name, metric)
    else:
        return _do_all(iterable, name, metric)