def METHOD_NAME(*args, **kwargs):
    current_retry = retries
    while True:
        try:
            return func(*args, **kwargs)
        except exception_type as ex:  # pylint: disable=broad-except
            if condition and not condition(ex):
                raise ex
            current_retry -= 1
            if current_retry <= 0:
                raise ex
        sleep(interval_sec)