def METHOD_NAME(token):
    global check_first_from, obj_list, before_from
    # After encountering the first from
    if check_first_from and not before_from: 
        # get the indentifierlist or identifier and append to list
        if isinstance(token, IdentifierList) and "(" not in str(token).lower():
            for identifier in token.get_identifiers():
                obj_list.append(str(identifier).upper())
            return
        elif isinstance(token,Identifier)  and "(" not in str(token).lower():
            obj_list.append(str(token).upper())  
            return 
    # check if from is encountered
    if str(token).lower() == 'from':
        check_first_from = True
    else:
        # Check if we dont have a cross join token
        if not isinstance(token, TokenList) and isinstance(token,Token):
            if "keyword" in str(token.ttype).lower() and str(token) not in ["CROSS JOIN"]:
                before_from = True
            else:
                if "whitespace" not in str(token.ttype).lower():
                    before_from = False
        # remove check_first_from if we get a keyword or a parenthesis
        if check_first_from and isinstance(token, Token) and ("keyword" in str(token.ttype).lower() or isinstance(token,Parenthesis)):
            if str(token) not in ["CROSS JOIN"]:
                check_first_from = False
    if (isinstance(token, TokenList) or type(token) is list):
        for tok in token:
            METHOD_NAME(tok)