def overlap(start_1, end_1, start_2, end_2):
    """Return the `range` covered by two sets of coordinates.

    The coordinates should be supplied inclusive, that is, the end coordinates
    are included in the region. The `range` returned will be exclusive, in
    keeping with the correct usage of that type.

    Parameters
    ----------
    start_1, start_2 : int
        The start coordinates of each region.
    end_1, end_2 : int
        The end coordinates of each region.

    Returns
    -------
    range
        The `range` covered by both regions. If there is no overlap then start
        of the range will be equal to or greater than the end, thus having zero
        or negative length.
    """
    return range(max(start_1, start_2),
                 min(end_1, end_2) + 1)