def overlap(a, b):
    """Returns overlap of a and b (symmetric)

        Cases:
        * overlap  < 0 when a and b do not overlap
        * overlap == 0 when a and b abut or at least one is zero width
        * overlap  > 0 when a and b overlap

        """
    return min(a.end, b.end) - max(a.start, b.start)
