code: public Dag<T> merge(Dag<T> other) {
      if (other == null || other.isEmpty()) {
        return this;
      }
      if (this.isEmpty()) {
        return other;
      }
      //Append all the entries from the other dag's parentChildMap to this dag's parentChildMap
      for (Map.Entry<DagNode, List<DagNode<T>>> entry : other.parentChildMap.entrySet()) {
        this.parentChildMap.put(entry.getKey(), entry.getValue());
      }
      //Append the startNodes, endNodes and nodes from the other dag to this dag.
      this.startNodes.addAll(other.startNodes);
      this.endNodes.addAll(other.endNodes);
      this.nodes.addAll(other.nodes);
      return this;
    }
docs: Merge the "other" dag to "this" dag and return "this" dag as a forest of the two dags.
  More specifically, the merge() operation takes two dags and returns a disjoint union of the two dags.
  
  @param other dag to merge to this dag
  @return the disjoint union of the two dags