, // the user cannot select any part
      // create a TreeLayout for the decision tree
      layout: new go.TreeLayout({ arrangement: go.TreeArrangement.FixedRoots })
    });

    // custom behavior for expanding/collapsing half of the subtree from a node
    function buttonExpandCollapse(e, port) {
      var node = port.part;
      node.diagram.startTransaction('expand/collapse');
      var portid = port.portId;
      node.findLinksOutOf(portid).each((l) => {
        if (l.visible) {
          // collapse