code: void flattenSets() {
          Assert.assrt(fType != setRef);
  
          if (fLeftChild != null) {
              if (fLeftChild.fType == setRef) {
                  RBBINode setRefNode = fLeftChild;
                  RBBINode usetNode = setRefNode.fLeftChild;
                  RBBINode replTree = usetNode.fLeftChild;
                  fLeftChild = replTree.cloneTree();
                  fLeftChild.fParent = this;
              } else {
                  fLeftChild.flattenSets();
              }
          }
  
          if (fRightChild != null) {
              if (fRightChild.fType == setRef) {
                  RBBINode setRefNode = fRightChild;
                  RBBINode usetNode = setRefNode.fLeftChild;
                  RBBINode replTree = usetNode.fLeftChild;
                  fRightChild = replTree.cloneTree();
                  fRightChild.fParent = this;
                  // delete setRefNode;
              } else {
                  fRightChild.flattenSets();
              }
          }
      }
docs: -------------------------------------------------------------------------