code: public boolean isRoot(T payload) {
      if (!contains(payload)) {
        return false;
      }
      return mRoots.contains(mIndex.get(payload));
    }
docs: Checks if a given payload is in a root of the DAG.
  
  @param payload the payload to check for root
  @return true if the payload is in the root of the DAG, false otherwise