def timer(self, metric_name, context=None, **kwargs):
metric = self._create_metric(metric_name, None, context, **kwargs)<EOL>return LogTimer(metric, self.logger, self.time_unit)<EOL>
Create a LogTimer.

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