code: public Node chooseRandom(String scope) {
      netlock.readLock().lock();
      try {
        if (scope.startsWith("~")) {
          return chooseRandom(NodeBase.ROOT, scope.substring(1));
        } else {
          return chooseRandom(scope, null);
        }
      } finally {
        netlock.readLock().unlock();
      }
    }
docs: randomly choose one node from <i>scope</i>
  if scope starts with ~, choose one from the all nodes except for the
  ones in <i>scope</i>; otherwise, choose one from <i>scope</i>
  @param scope range of nodes from which a node will be choosen
  @return the choosen node