def timer(metric_name, context=None, **kwargs):
Get a timer object which implements ITimer.

        Args:
            metric_name (str): Identifier of the metric.
            context (dict): (optional) Additional key-value pairs which further
                describe the metric, for example: {'unit': 'seconds'}