def valid_code(self, client_id, code):
        """Validates if a code is (still) a valid one. It takes two arguments:
        * The client application ID
        * The temporary code given by the application
        It returns True if the code is valid. Otherwise, False
        """
        
        try:
            data = self.db.codes(self.db.codes.code_id == code).select(self.db.expires_access).first()
        except __HOLE__:
            self.create_tables()
            return False

        if data:
            return datetime.datetime.now() < data.expires_access

        return False
dataset/ETHPy150Open joaoqalves/web2py-oauth2/modules/oauth/storage/__init__.py/web2pyStorage.valid_code