static Map<String, Map<String, Long>> convertAggregatedAccountStorageStatsToMap(
      AggregatedAccountStorageStats aggregatedAccountStorageStats, boolean usePhysicalStorageUsage) {
    Map<String, Map<String, Long>> result = new HashMap<>();
    if (aggregatedAccountStorageStats == null) {
      return result;
    }
    Map<Short, Map<Short, ContainerStorageStats>> storageStats = aggregatedAccountStorageStats.getStorageStats();
    for (short accountId : storageStats.keySet()) {
      Map<String, Long> containerMap = storageStats.get(accountId)
          .entrySet()
          .stream()
          .collect(Collectors.toMap(ent -> String.valueOf(ent.getKey()),
              ent -> usePhysicalStorageUsage ? ent.getValue().getPhysicalStorageUsage()
                  : ent.getValue().getLogicalStorageUsage()));
      result.put(String.valueOf(accountId), containerMap);
    }
    return result;
  }
Convert an {@link AggregatedAccountStorageStats} to a map from account id to container id to storage usage.
The account id and container id are keys of the outer map and the inner map, they are both in string format.
@param aggregatedAccountStorageStats The {@link AggregatedAccountStorageStats}.
@param usePhysicalStorageUsage True to use physical storage, false to use logical storage usage.
@return A map from account id to container id to storage usage.
ambry-quota/src/main/java/com/github/ambry/quota/storage/MySqlStorageUsageRefresher.java