code: public Map<String, List<ExecutorDetails>> getNeedsSchedulingComponentToExecutors(TopologyDetails topology) {
          Map<ExecutorDetails, String> executorToComponents = this.getNeedsSchedulingExecutorToComponents(topology);
          Map<String, List<ExecutorDetails>> componentToExecutors = new HashMap<>();
          for (ExecutorDetails executor : executorToComponents.keySet()) {
              String component = executorToComponents.get(executor);
              if (!componentToExecutors.containsKey(component)) {
                  componentToExecutors.put(component, new ArrayList<ExecutorDetails>());
              }
  
              componentToExecutors.get(component).add(executor);
          }
  
          return componentToExecutors;
      }
docs: Gets a component-id -> executors map which needs scheduling in this topology.