code: public Integer addNode(final int termIndex, final String label) {
          if (label == null) {
              throw new InvalidArgument("label", label);
          }
  
          // if we have already seen this term index, return
          Integer visitedIndex = termNodeIndex.get(termIndex);
          if (visitedIndex != null) {
              return visitedIndex;
          }
  
          // add this new proto node
          int pnIndex = protoNodes.size();
          protoNodes.add(label);
  
          // bi-directionally map term index to node index
          termNodeIndex.put(termIndex, pnIndex);
          nodeTermIndex.put(pnIndex, termIndex);
          getEquivalences().put(pnIndex, getEquivalences().size());
  
          return pnIndex;
      }
docs: Adds a proto node {@link String label} for a specific {@link Integer term
  index}. If the {@link Integer term index} has already been added then its
  {@link Integer proto node index} will be returned.
  <p>
  This operation maintains the {@link Map map} of term index to node index.
  </p>
  
  @param termIndex {@link Integer} the term index created from the addition
  to the {@link TermTable term table}
  @param label {@link String} the placeholder label from the
  {@link TermTable term table}
  @return the {@link Integer proto node index}
  @throws InvalidArgument Thrown if {@code label} is {@code null}