def explain(code_string, important=None):
    """Parse a string containing a function-like call, 
    return a namedtuple containing the results

    >>> explain('mymod.nestmod.func("arg1", "arg2", 
                                kw1="kword1", kw2="kword2",
                                *args, **kws')
    [Call(  args=['arg1', 'arg2'],
            keywords={'kw1': 'kword1', 'kw2': 'kword2'},
            starargs='args', 
            func='mymod.nestmod.func',
            kwargs='kws')]

    optional 'important' argument is a list of features to parse
    from the code_string. Features defined for a Call Node:

    args - positional arguments,
    keywords - keyword arguments,
    starargs - excess positional arguments,
    kwargs - excess keyword arguments,
    func - chained function attribute lookup.
    """

    node = ast.parse(code_string)

    visitor = StrNodeVisitor(important)

    return visitor.visit(node)
Parse a string containing a function-like call, 
    return a namedtuple containing the results

    >>> explain('mymod.nestmod.func("arg1", "arg2", 
                                kw1="kword1", kw2="kword2",
                                *args, **kws')
    [Call(  args=['arg1', 'arg2'],
            keywords={'kw1': 'kword1', 'kw2': 'kword2'},
            starargs='args', 
            func='mymod.nestmod.func',
            kwargs='kws')]

    optional 'important' argument is a list of features to parse
    from the code_string. Features defined for a Call Node:

    args - positional arguments,
    keywords - keyword arguments,
    starargs - excess positional arguments,
    kwargs - excess keyword arguments,
    func - chained function attribute lookup.
    
recipes/Python/576671_Parse_call_functiPy26_Py27_/recipe-576671.py