@classmethod
def union(cls, interval1, interval2):
    """Smallest interval comprising self and interval2"""
    return cls(min(interval1.first, interval2.first), max(interval1.last,
        interval2.last))
