public NodeList list(Node.State... inState) {
        NodeList allNodes = NodeList.copyOf(db.readNodes());
        NodeList nodes = inState.length == 0 ? allNodes : allNodes.state(Set.of(inState));
        nodes = NodeList.copyOf(nodes.stream().toList());
        return nodes;
    }
Returns an unsorted list of all nodes in this repository, in any of the given states

@param inState the states to return nodes from. If no states are given, all nodes are returned
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/Nodes.java