def group_for_view_by(view_by, measures)
      if view_by.nil? || measures.nil?
        return nil
      else
        return {
          metric: measures.first,
          dimension: view_by,
          rank: "DESCENDING",
          limit: 3
        }
      end
    end
def group_for_view_by(view_by, measures)
      if view_by.nil? || measures.nil?
        return nil
      else
        return {
          metric: measures.first,
          dimension: view_by,
          rank: "DESCENDING",
          limit: 3
        }
      end
    end
generates group hash used in the analytics time_series API.
 Using rank=DESCENDING and limit=3 as this is what the App Store Connect analytics dashboard uses.