def timespans_overlap(a_start, a_stop, b_start, b_stop):
    """
    returns True if A intersects with B

    A and B are defiend as abstract start and ends and can be as follows
        - Integers
        - Datetimes
    """

    # Case 1: B is within A
    if a_start <= b_start and a_stop >= b_stop:
        return True

    # Case 2: B ends during A
    if a_start >= b_start and a_start < b_stop:
        return True

    # Case 3: B starts during A
    if a_stop > b_start and a_stop <= b_stop:
        return True

    return False