def METHOD_NAME(times=1):
    scope = dict(times=0)
    def inner():
        if scope['times'] >= times:
            pass
        else:
            scope['times'] += 1
            raise PatroniException('Failed!')
    return inner