code: def sortByTotal(requestContext, seriesList):
      
      return list(sorted(seriesList, key=safeSum, reverse=True))
docs: Takes one metric or a wildcard seriesList.
  
      Sorts the list of metrics by the sum of values across the time period
      specified.