@staticmethod
def _map_merge(dest: 'BaseContainer', src: 'BaseContainer') -> None:
    'merge src into dest and return a new copy, does not modified input'
    from omegaconf import AnyNode, DictConfig, ValueNode
    assert isinstance(dest, DictConfig)
    assert isinstance(src, DictConfig)
    src_type = src._metadata.object_type
    src_ref_type = get_ref_type(src)
    assert (src_ref_type is not None)
    if (src._is_none() or src._is_interpolation()):
        dest._set_value(src._value())
        _update_types(node=dest, ref_type=src_ref_type, object_type=src_type)
        return
    dest._validate_merge(value=src)

    def expand(node: Container) -> None:
        rt = node._metadata.ref_type
        val: Any
        if (rt is not Any):
            if is_dict_annotation(rt):
                val = {}
            elif (is_list_annotation(rt) or is_tuple_annotation(rt)):
                val = []
            else:
                val = rt
        elif isinstance(node, DictConfig):
            val = {}
        else:
            assert False
        node._set_value(val)
    if (src._is_missing() and (not dest._is_missing()) and is_structured_config(src_ref_type)):
        src = _create_structured_with_missing_fields(ref_type=src_ref_type, object_type=src_type)
    if ((dest._is_interpolation() or dest._is_missing()) and (not src._is_missing())):
        expand(dest)
    src_items = (src.items_ex(resolve=False) if (not src._is_missing()) else [])
    for (key, src_value) in src_items:
        src_node = src._get_node(key, validate_access=False)
        dest_node = dest._get_node(key, validate_access=False)
        assert ((src_node is None) or isinstance(src_node, Node))
        assert ((dest_node is None) or isinstance(dest_node, Node))
        if isinstance(dest_node, DictConfig):
            dest_node._validate_merge(value=src_node)
        missing_src_value = _is_missing_value(src_value)
        if (isinstance(dest_node, Container) and dest_node._is_none() and (not missing_src_value) and (not _is_none(src_value, resolve=True))):
            expand(dest_node)
        if ((dest_node is not None) and dest_node._is_interpolation()):
            target_node = dest_node._maybe_dereference_node()
            if isinstance(target_node, Container):
                dest[key] = target_node
                dest_node = dest._get_node(key)
        (is_optional, et) = _resolve_optional(dest._metadata.element_type)
        if ((dest_node is None) and is_structured_config(et) and (not missing_src_value)):
            dest[key] = DictConfig(et, parent=dest, ref_type=et, is_optional=is_optional)
            dest_node = dest._get_node(key)
        if (dest_node is not None):
            if isinstance(dest_node, BaseContainer):
                if isinstance(src_value, BaseContainer):
                    dest_node._merge_with(src_value)
                elif (not missing_src_value):
                    dest.__setitem__(key, src_value)
            elif isinstance(src_value, BaseContainer):
                dest.__setitem__(key, src_value)
            else:
                assert isinstance(dest_node, ValueNode)
                assert isinstance(src_node, ValueNode)
                src_node_missing = _is_missing_literal(src_value)
                try:
                    if isinstance(dest_node, AnyNode):
                        if src_node_missing:
                            node = copy.copy(src_node)
                            node._set_value(dest_node._value())
                        else:
                            node = src_node
                        dest.__setitem__(key, node)
                    elif (not src_node_missing):
                        dest_node._set_value(src_value)
                except (ValidationError, ReadonlyConfigError) as e:
                    dest._format_and_raise(key=key, value=src_value, cause=e)
        else:
            from omegaconf import open_dict
            if is_structured_config(src_type):
                with open_dict(dest):
                    dest[key] = src._get_node(key)
            else:
                dest[key] = src._get_node(key)
    _update_types(node=dest, ref_type=src_ref_type, object_type=src_type)
    flags = src._metadata.flags
    assert (flags is not None)
    for (flag, value) in flags.items():
        if (value is not None):
            dest._set_flag(flag, value)
merge src into dest and return a new copy, does not modified input
@staticmethod
def _map_merge(dest: 'BaseContainer', src: 'BaseContainer') -> None:
    
    from omegaconf import AnyNode, DictConfig, ValueNode
    assert isinstance(dest, DictConfig)
    assert isinstance(src, DictConfig)
    src_type = src._metadata.object_type
    src_ref_type = get_ref_type(src)
    assert (src_ref_type is not None)
    if (src._is_none() or src._is_interpolation()):
        dest._set_value(src._value())
        _update_types(node=dest, ref_type=src_ref_type, object_type=src_type)
        return
    dest._validate_merge(value=src)

    def expand(node: Container) -> None:
        rt = node._metadata.ref_type
        val: Any
        if (rt is not Any):
            if is_dict_annotation(rt):
                val = {}
            elif (is_list_annotation(rt) or is_tuple_annotation(rt)):
                val = []
            else:
                val = rt
        elif isinstance(node, DictConfig):
            val = {}
        else:
            assert False
        node._set_value(val)
    if (src._is_missing() and (not dest._is_missing()) and is_structured_config(src_ref_type)):
        src = _create_structured_with_missing_fields(ref_type=src_ref_type, object_type=src_type)
    if ((dest._is_interpolation() or dest._is_missing()) and (not src._is_missing())):
        expand(dest)
    src_items = (src.items_ex(resolve=False) if (not src._is_missing()) else [])
    for (key, src_value) in src_items:
        src_node = src._get_node(key, validate_access=False)
        dest_node = dest._get_node(key, validate_access=False)
        assert ((src_node is None) or isinstance(src_node, Node))
        assert ((dest_node is None) or isinstance(dest_node, Node))
        if isinstance(dest_node, DictConfig):
            dest_node._validate_merge(value=src_node)
        missing_src_value = _is_missing_value(src_value)
        if (isinstance(dest_node, Container) and dest_node._is_none() and (not missing_src_value) and (not _is_none(src_value, resolve=True))):
            expand(dest_node)
        if ((dest_node is not None) and dest_node._is_interpolation()):
            target_node = dest_node._maybe_dereference_node()
            if isinstance(target_node, Container):
                dest[key] = target_node
                dest_node = dest._get_node(key)
        (is_optional, et) = _resolve_optional(dest._metadata.element_type)
        if ((dest_node is None) and is_structured_config(et) and (not missing_src_value)):
            dest[key] = DictConfig(et, parent=dest, ref_type=et, is_optional=is_optional)
            dest_node = dest._get_node(key)
        if (dest_node is not None):
            if isinstance(dest_node, BaseContainer):
                if isinstance(src_value, BaseContainer):
                    dest_node._merge_with(src_value)
                elif (not missing_src_value):
                    dest.__setitem__(key, src_value)
            elif isinstance(src_value, BaseContainer):
                dest.__setitem__(key, src_value)
            else:
                assert isinstance(dest_node, ValueNode)
                assert isinstance(src_node, ValueNode)
                src_node_missing = _is_missing_literal(src_value)
                try:
                    if isinstance(dest_node, AnyNode):
                        if src_node_missing:
                            node = copy.copy(src_node)
                            node._set_value(dest_node._value())
                        else:
                            node = src_node
                        dest.__setitem__(key, node)
                    elif (not src_node_missing):
                        dest_node._set_value(src_value)
                except (ValidationError, ReadonlyConfigError) as e:
                    dest._format_and_raise(key=key, value=src_value, cause=e)
        else:
            from omegaconf import open_dict
            if is_structured_config(src_type):
                with open_dict(dest):
                    dest[key] = src._get_node(key)
            else:
                dest[key] = src._get_node(key)
    _update_types(node=dest, ref_type=src_ref_type, object_type=src_type)
    flags = src._metadata.flags
    assert (flags is not None)
    for (flag, value) in flags.items():
        if (value is not None):
            dest._set_flag(flag, value)