class AbstractNetworkResourceManager implements NetworkResourceManager {

    private final List<NetworkResourceUser> resourceUsers;

    public AbstractNetworkResourceManager(List<NetworkResourceUser> resourceUser) {
        this.resourceUsers = resourceUser;
    }

    @Override
    public final Flux<NetworkResource> getAliveResources() {<FILL_FUNCTION_BODY>}

    public final Flux<NetworkResource> getLocalUsedResources() {
        return Flux
            .fromIterable(resourceUsers)
            .flatMap(NetworkResourceUser::getUsedResources);
    }

    public abstract Flux<NetworkResource> getLocalAllResources();

}


        Mono<Map<String, List<NetworkResource>>> usedMapping = this
            .getLocalUsedResources()
            .collect(Collectors.groupingBy(NetworkResource::getHost))
            .cache();
        return this
            .getLocalAllResources()
            .map(NetworkResource::copy)
            .flatMap(resource -> usedMapping
                .map(usedMap -> {
                    List<NetworkResource> usedList = usedMap.get(resource.getHost());
                    if (CollectionUtils.isNotEmpty(usedList)) {
                        for (NetworkResource used : usedList) {
                            resource.removePorts(used.getPorts());
                        }
                    }
                    return resource;
                }));
    
<no_super_class>