def _validate_timeout(self, timeout):
        """
        Internal method to validate timeouts. If no timeout
        is passed, then the default_timeout is used.

        Args:
            timeout: datetime.datetime format

        Returns the timeout
        """
        if timeout == None:
            timeout = datetime.datetime.now() +\
            datetime.timedelta(seconds=self.default_timeout)
        if type(timeout) == type(1):
            timeout = datetime.datetime.now() + \
                datetime.timedelta(seconds = timeout)
        if type(timeout) != datetime.datetime:
            raise TypeError
        if datetime.datetime.now() < timeout:
            raise ValueError

        return timeout
dataset/ETHPy150Open CollabQ/CollabQ/common/appengine_utilities/cache.py/Cache._validate_timeout/swapped operands of `<`