def _range_intersection(a, b):
    """
    Returns the range where the two given ranges intersect.

    Parameters
    ----------
        a, b: Each is a list of two coordinate values designating a min-max
            range.

    Returns
    -------
        A range (a list of two numbers) where the two given ranges intersect,
        or an empty list if they do not. E.g., a = [0, 10], b = [5, 15] will
        return [5, 10].
    """
    if (b[0] <= a[0] <= b[1]) or \
       (b[0] <= a[1] <= b[1]) or \
       (a[0] <= b[0] <= a[1]) or \
       (a[0] <= b[1] <= a[1]): 
        return [max(a[0], b[0]), min(a[1], b[1])]
    else:
        return []