docs: protected void setParent(Node newParent, boolean removeDep) {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "setParent entry: new parent will be: " + newParent + " for node: " + this);
          }
  
          Node oldParent = parent;
  
          parent = newParent;
          if (newParent != null) {
              parent.addDependent(this);
          }
  
          // removing dependents can cause ConcurrentModificationException if calling is iterating over a list of dependent nodes
          // therefore removeDep should be false if setParent is being called while iterating or looping over a list of
          // dependent nodes.
          if (removeDep) {
              // remove this node from the old parents list of dependents.
              if (oldParent != null) {
                  if (newParent == null) {
                      oldParent.removeDependent(this);
                  } else if (oldParent.getStreamID() != parent.getStreamID()) {
                      oldParent.removeDependent(this);
                  }
              }
          }
      }