(node, results, names)
return new
Returns an import statement and calls a method
    of the module:

    import module
    module.name()
Returns an import statement and calls a method
    of the module:
Returns an import statement and calls a method of the module :
def ImportAndCall(node, results, names):
    """Returns an import statement and calls a method
    of the module:

    import module
    module.name()"""
    obj = results["obj"].clone()
    if obj.type == syms.arglist:
        newarglist = obj.clone()
    else:
        newarglist = Node(syms.arglist, [obj.clone()])
    after = results["after"]
    if after:
        after = [n.clone() for n in after]
    new = Node(syms.power,
               Attr(Name(names[0]), Name(names[1])) +
               [Node(syms.trailer,
                     [results["lpar"].clone(),
                      newarglist,
                      results["rpar"].clone()])] + after)
    new.prefix = node.prefix
    return new
def ImportAndCall ( node , results , names ) : obj = results [ "obj" ] . clone ( ) if obj . type == syms . arglist : newarglist = obj . clone ( ) else : newarglist = Node ( syms . arglist , [ obj . clone ( ) ] ) after = results [ "after" ] if after : after = [ n . clone ( ) for n in after ] new = Node ( syms . power , Attr ( Name ( names [ 0 ] ) , Name ( names [ 1 ] ) ) + [ Node ( syms . trailer , [ results [ "lpar" ] . clone ( ) , newarglist , results [ "rpar" ] . clone ( ) ] ) ] + after ) new . prefix = node . prefix return new