public ObjectNode merge(ObjectNode other) {
        Map<StringNode, Node> result = new LinkedHashMap<>(getMembers());
        result.putAll(other.nodeMap);
        return new ObjectNode(
                result,
                getSourceLocation() != SourceLocation.NONE ? getSourceLocation() : other.getSourceLocation(),
                false); // Use the constructor that doesn't re-copy.
    }
Merge this object node with another, creating a new ObjectNode.

<p>Conflicting keys are overwritten by {@code other}. If the current
object has a source location, it is applied to the result. Otherwise,
the source location of {@code other} is applied to the result.

@param other Other object node to merge with.
@return Returns the merged object node.
smithy-model/src/main/java/software/amazon/smithy/model/node/ObjectNode.java