def is_hr_between(time: int, time_range: tuple) -> bool:
    """
    Calculate if hour is within a range of hours
    Example: is_hr_between(4, (24, 5)) will match hours from 24:00:00 to 04:59:59
    """
    if time_range[1] < time_range[0]:
        return time >= time_range[0] or time <= time_range[1]
    return time_range[0] <= time <= time_range[1]