Is there a way to get the position of node relative to group node

So, basically we have requirement, where we want position of node relative to group template to which node is dropped or node is member of. So we have copy feature where we want to copy all nodes from on group to other so we want to have same position for each nodes when we copy.

Could you just make a copy of the nodes and links, and then move them all to where you want them to be and then add them to the target Group?

Here’s what I just tried:

  myDiagram.commit(diag => {
    const g3 = diag.findNodeForKey(-3);  // this Group has some Nodes and Links in it
    const g4 = diag.findNodeForKey(-4);  // this Group is empty
    const copymap = diag.copyParts(g3.memberParts, diag, false);
    diag.moveParts(copymap.toKeySet(), new go.Point(0, 200), false);
    copymap.iteratorValues.each(node => {
      if (node instanceof go.Link) return;
      node.containingGroup = g4;