docs: public static Resource computeTotalResourceChange(TopologyAPI.Topology topology,
                                                      Map<String, Integer> componentChanges,
                                                      Resource defaultInstanceResources,
                                                      ScalingDirection scalingDirection) {
      double cpu = 0;
      ByteAmount ram = ByteAmount.ZERO;
      ByteAmount disk = ByteAmount.ZERO;
      Map<String, ByteAmount> ramMap = TopologyUtils.getComponentRamMapConfig(topology);
      Map<String, Integer> componentsToScale = PackingUtils.getComponentsToScale(
          componentChanges, scalingDirection);
      for (String component : componentsToScale.keySet()) {
        int parallelismChange = Math.abs(componentChanges.get(component));
        cpu += parallelismChange * defaultInstanceResources.getCpu();
        disk = disk.plus(defaultInstanceResources.getDisk().multiply(parallelismChange));
        if (ramMap.containsKey(component)) {
          ram = ram.plus(ramMap.get(component).multiply(parallelismChange));
        } else {
          ram = ram.plus(defaultInstanceResources.getRam().multiply(parallelismChange));
        }
      }
      return new Resource(cpu, ram, disk);
    }