code: public void ensureNodeStateExists(@NonNull String nodeName) {
          if (!states.containsKey(nodeName))
              states.put(nodeName, new NodeState(nodeName));
      }
docs: This method checks if NodeState was created for specified graph node
  
  @param nodeName