def _intervalOverlap(a, b):
    """ Return overlap between two intervals

    Args:
        a (list or tuple): first interval
        b (list or tuple): second interval
    Returns:
        float: overlap between the intervals

    Example:
    >>> _intervalOverlap( [0,2], [0,1])
    1
    """
    return max(0, min(a[1], b[1]) - max(a[0], b[0]))