def enumerate_builtins(tokens):
out = []<EOL>for index, tok in enumerate(tokens):<EOL><INDENT>token_type = tok[<NUM_LIT:0>]<EOL>token_string = tok[<NUM_LIT:1>]<EOL>if token_string in builtins:<EOL><INDENT>special_special = ['<STR_LIT>'] <EOL>if py3:<EOL><INDENT>special_special = []<EOL><DEDENT>if token_string not in special_special:<EOL><INDENT>if not token_string.startswith('<STR_LIT>'): <EOL><INDENT>if tokens[index-<NUM_LIT:1>][<NUM_LIT:1>] != '<STR_LIT:.>' and tokens[index+<NUM_LIT:1>][<NUM_LIT:1>] != '<STR_LIT:=>':<EOL><INDENT>if token_string not in out:<EOL><INDENT>out.append(token_string)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>return out<EOL>
Returns a list of all the builtins being used in *tokens*.