

def _resourceOverlap(self, res1_start_time, res1_end_time, res2_start_time, res2_end_time):
    now = datetime.datetime.utcnow()
    forever = datetime.datetime(9999, 1, 1)
    r1s = (res1_start_time or now)
    r2s = (res2_start_time or now)
    r1e = (res1_end_time or forever)
    r2e = (res2_end_time or forever)
    assert (r1s < r1e), 'Cannot detect overlap for backwards reservation (1)'
    assert (r2s < r2e), 'Cannot detect overlap for backwards reservation (2)'
    if (r2e < r1s):
        return False
    if (r2s > r1e):
        return False
    return True

dataset/ETHPy150Open NORDUnet/opennsa/opennsa/backends/common/calendar.py ReservationCalendar._resourceOverlap/original