

def checkReservation(self, resource, start_time, end_time):
    self._checkArgs(stamp, start_time, end_time)
    if ((start_time is not None) and (end_time is not None) and (start_time > end_time)):
        raise error.PayloadError('Invalid request: Reverse duration (end time before start time)')
    if (start_time is not None):
        now = datetime.datetime.utcnow()
        if (start_time < now):
            delta = (now - start_time)
            stamp = str(start_time).rsplit('.')[0]
            variables = [('startTime', start_time.isoformat())]
            raise error.PayloadError(('Invalid request: Start time in the past (Startime: %s, Delta: %s)' % (stamp, str(delta))), variables=variables)
        if (start_time > datetime.datetime(2025, 1, 1)):
            raise error.PayloadError('Invalid request: Start time after year 2025')
    for (c_resource, c_start_time, c_end_time) in self.reservations:
        if (resource == c_resource):
            if self._resourceOverlap(c_start_time, c_end_time, start_time, end_time):
                raise error.STPUnavailableError(('Resource %s not available in specified time span' % resource))

dataset/ETHPy150Open NORDUnet/opennsa/opennsa/backends/common/calendar.py ReservationCalendar.checkReservation/VarMisuse@20/29 `resource`->`stamp`