def repeat_until_consistent(self, f, *args, **kwargs):
        """
        Repeatedly call a function with given arguments until AssertionErrors
        stop or configured number of repetitions are reached.

        Some backends are eventually consistent, which means results of
        listing volumes may not reflect actions immediately. So for
        read-only operations that rely on listing we want to be able to
        retry.

        Retry policy can be changed by overriding the ``repeat_retries``
        method.

        @param f: Function to call.
        @param args: Arguments for ``f``.
        @param kwargs: Keyword arguments for ``f``.
        """
        for step in self.repeat_retries():
            try:
                return f(*args, **kwargs)
            except __HOLE__ as e:
                time.sleep(step)
        raise e
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/testtools/_blockdevice.py/IBlockDeviceAPITestsMixin.repeat_until_consistent