'Unpack **args in place if we can.'

def visit_MergedDictNode(self, node):

    self.visitchildren(node)
    args = []
    items = []
    def add(arg):
        if arg.is_dict_literal:
            if items:
                items[0].key_value_pairs.extend(arg.key_value_pairs)
            else:
                items.append(arg)
        elif isinstance(arg, ExprNodes.MergedDictNode):
            for child_arg in arg.keyword_args:
                add(child_arg)
        else:
            if items:
                args.append(items[0])
                del items[:]
            args.append(arg)
    for arg in node.keyword_args:
        add(arg)
    if items:
        args.append(items[0])
    if (len(args) == 1):
        arg = args[0]
        if (arg.is_dict_literal or isinstance(arg, ExprNodes.MergedDictNode)):
            return arg
    node.keyword_args[:] = args
    self._calculate_const(node)
    return node
