def extract_kw_args(args):
    """
    Extracts KW args and turns them into a dictionary
    :param args: 2d tuple of form ((TOKEN,VALUE),..)
    :return: Dictionary with key being token data and value being the value
    """
    d = {}
    for child in args:
        if len(child) == 2:
            d[child[0].value] = child[1]
    return d
