presto-main/src/main/java/io/prestosql/metadata/DiscoveryNodeManager.java/DiscoveryNodeManager/isNodeShuttingDown
class DiscoveryNodeManager:    private boolean isNodeShuttingDown(String nodeId)
    {
        Optional<NodeState> remoteNodeState = nodeStates.containsKey(nodeId)
                ? nodeStates.get(nodeId).getNodeState()
                : Optional.empty();
        return remoteNodeState.isPresent() && remoteNodeState.get() == SHUTTING_DOWN;
    }