def range_overlap(
    left_range: range,
    right_range: range,
) -> bool:
    """
    Checks if two ranges have an overlap.
    Here each range is assumed to be consecutive, i.e., `step` field of `range` is always 1.

    Parameters
    ----------
    left_range
    right_range

    Returns
    -------
    True or False depending on the overlap.

    """
    if left_range[0] <= right_range[-1] and left_range[-1] >= right_range[0]:
        return True
    return False