def enumerate_keyword_args(tokens):
    keyword_args = {}
    inside_function = False
    for index, tok in enumerate(tokens):
        token_type = tok[0]
        token_string = tok[1]
        if token_type == tokenize.NEWLINE:
            inside_function = False
        if token_type == tokenize.NAME:
            if token_string == "def":
                function_name = tokens[index+1][1]
                inside_function = function_name
                keyword_args.update({function_name: []})
            elif inside_function:
                if tokens[index+1][1] == '=': # keyword argument
                    keyword_args[function_name].append(token_string)
    return keyword_args
Iterates over *tokens* and returns a dictionary with function names as the
dataset/ETHPy150Open b3mb4m/shellsploit-framework/shell/Session/encoders/pyminifier/analyze.py/enumerate_keyword_args