code: @Override
    protected double computeCost(
        final DataSegment proposalSegment,
        final ServerHolder server,
        final boolean includeCurrentServer
    )
    {
      double cost = super.computeCost(proposalSegment, server, includeCurrentServer);
  
      if (cost == Double.POSITIVE_INFINITY) {
        return cost;
      }
  
      int nSegments = 1;
      if (server.getServer().getLazyAllSegments().size() > 0) {
        nSegments = server.getServer().getLazyAllSegments().size();
      }
  
      double normalizedCost = cost / nSegments;
      double usageRatio = (double) server.getSizeUsed() / (double) server.getServer().getMaxSize();
  
      return normalizedCost * usageRatio;
    }
docs: Averages the cost obtained from CostBalancerStrategy. Also the costs are weighted according to their usage ratios.
  This ensures that all the hosts will have the same % disk utilization.