decorator in class to check sql call

I would like to use QueryChecker.check_query decorator to detect if they have any old table names which were replaced by new ones.

class QueryChecker:
    def tables_in_query(sql_str):

        # remove the /* */ comments
        q = re.sub(r"/\*[^*]*\*+(?:[^*/][^*]*\*+)*/", "", sql_str)

        # remove whole line -- and # comments
        lines = [line for line in q.splitlines() if not re.match("^\s*(--|#)", line)]

        # remove trailing -- and # comments
        q = " ".join([re.split("--|#", line)[0] for line in lines])

        # split on blanks, parens and semicolons
        tokens = re.split(r"[\s)(;]+", q)

        # scan the tokens. if we see a FROM or JOIN, we set the get_next
        # flag, and grab the next one (unless it's SELECT).

        result = set()
        get_next = False
        for tok in tokens:
            if get_next:
                if tok.lower() not in ["", "select"]:
                get_next = False
            get_next = tok.lower() in ["from", "join"]

        return result

    def check_tables(tables):
        if tables == set():

        prefixes = {
            'old_table': 'new_table',
            'second_old_table': 'second_new_table'

        for table in tables:
            # remove db name if exist
            table = table.split('.')[-1]
            for prefix in prefixes.keys():
                if table.startswith(prefix):
                    print(f"!! {table} to {table.replace(prefix, prefixes[prefix])} !!")

    def check_query(self, run_query):
        def wrapper(new_self, query) :
            tables = self.tables_in_query(query)
            print(f'Tables being queried: {tables}')
            new_self.run_query( query)
        return wrapper

class Palim:

    def run_query(self, query):

palim = Palim()

FROM database

TypeError: check_query() missing 1 required positional argument: 'run_query'

I had it working outside of a class, but I would like to have it inside a class to signal that these functions belong together.

class Palim is different in the code base and runs the query here it is a simple print for reproducability.