def METHOD_NAME(self):
    """
    Context guard that ensures that decorated contexts are delayed in order to limit the number
    of status publications per second, defined by :py:attr:`max_rate`. Example:
    .. code-block:: python
        # print some numbers, which will take 10 / max_rate seconds
        for i in range(10):
            with self.rate_guard():
                print(i)
    """
    now = 0.0
    if self.max_rate > 0:
        now = perf_counter()
        diff = self._last_event_time + 1.0 / self.max_rate - now
        if diff > 0:
            time.sleep(diff)
    try:
        yield
    finally:
        self._last_event_time = now