private void toSlime(Collection<History.Event> events, Cursor array) {
        for (History.Event event : events) {
            Cursor object = array.addObject();
            object.setString("event", event.type().name());
            object.setLong("at", event.at().toEpochMilli());
            object.setString("agent", event.agent().name());
            event.reason().ifPresent(reason -> object.setString("reason", reason));
        }
    }
Outputs the nodes in the given states to a node array
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesResponse.java