import random


def get_backoff_delay(retry_count, delay_max):
    """Calculate exponential backoff with random jitter delay."""
    delay = round(
        min(delay_max, (2 ** retry_count)) - (random.randint(0, 1000) / 1000),
        3,
    )
    return delay