private boolean shouldRemove(Snapshot snapshot, NodeList nodes, Instant now) {
        Duration idle = snapshot.idle(now);
        if (idle.compareTo(expiry()) < 0) return false;                     // No:  Snapshot not idle long enough
        // TODO(mpolden): Replace this with a proper policy when implementing application-level backups
        if (nodes.node(snapshot.hostname().value()).isEmpty()) return true; // Yes: Snapshot belongs to non-existent node
        return snapshot.state() == Snapshot.State.restored;                 // Yes: Snapshot has been restored
    }
Returns whether given snapshot should be removed
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/SnapshotExpirer.java