docs: private void removeInstancesFromContainers(PackingPlanBuilder packingPlanBuilder,
                                               Map<String, Integer> componentsToScaleDown) {
  
      List<ResourceRequirement> resourceRequirements =
          getSortedInstances(componentsToScaleDown.keySet());
  
      InstanceCountScorer instanceCountScorer = new InstanceCountScorer();
      ContainerIdScorer containerIdScorer = new ContainerIdScorer(false);
  
      for (ResourceRequirement resourceRequirement : resourceRequirements) {
        String componentName = resourceRequirement.getComponentName();
        int numInstancesToRemove = -componentsToScaleDown.get(componentName);
        List<Scorer<Container>> scorers = new ArrayList<>();
  
        scorers.add(new HomogeneityScorer(componentName, true));  // all-same-component containers
        scorers.add(instanceCountScorer);                         // then fewest instances
        scorers.add(new HomogeneityScorer(componentName, false)); // then most homogeneous
        scorers.add(containerIdScorer);                           // then highest container id
  
        for (int j = 0; j < numInstancesToRemove; j++) {
          packingPlanBuilder.removeInstance(scorers, componentName);
        }
      }
    }