docs: private static void buildDependencyGraph(IServiceManager manager, List<DependencyNode> roots, List<Service> infraServices,
  			List<Service> freeServices, Accessors accessors) {
  		final Map<Class<? extends Service>, DependencyNode> dependentServices = new TreeMap<>(Comparators.CLASS_COMPARATOR);
  
  		Service service;
  		for (final Entry<State, Service> entry : manager.servicesByState().entries()) {
  			if (accessors.matches(entry.getKey())) {
  				service = entry.getValue();
  				if (service instanceof InfrastructureService) {
  					infraServices.add(service);
  				} else if (service instanceof DependentService) {
  					addNodeIntoDependencyGraph((DependentService) service, dependentServices, roots);
  				} else {
  					freeServices.add(service);
  				}
  			}
  		}
  
  		if (accessors.isAsyncStateWaitingEnabled()) {
  			for (final DependencyNode node : dependentServices.values()) {
  				assert node.getService() != null;
  				if (node.getService() instanceof AsyncStateService) {
  					for (final DependencyNode next : node.getNextServices()) {
  						next.getAsyncStateServices().add(new WeakReference<>(node));
  					}
  				}
  			}
  		}
  	}