docs: def time(self, subname=None, class_=None):
          '''Returns a context manager to time execution of a block of code.
  
          :keyword subname: The subname to report data to
          :type subname: str
          :keyword class_: The :class:`~statsd.client.Client` subclass to use
              (e.g. :class:`~statsd.timer.Timer` or
              :class:`~statsd.counter.Counter`)
          :type class_: :class:`~statsd.client.Client`
  
          >>> from statsd import Timer
          >>> timer = Timer('application_name')
          >>>
          >>> with timer.time():
          ...     # resulting timer name: application_name
          ...     pass
          >>>
          >>>
          >>> with timer.time('context_timer'):
          ...     # resulting timer name: application_name.context_timer
          ...     pass
  
          '''
          if class_ is None:
              class_ = Timer
          timer = self.get_client(subname, class_)
          timer.start()
          yield
          timer.stop('')