docs: def build_structure(self, check_name, groups, source_name, limit=1):
          '''
          Compiles the checks, results and scores into an aggregate structure which looks like:
  
              {
                "scored_points": 396,
                "low_count": 0,
                "possible_points": 400,
                "testname": "gliderdac",
                "medium_count": 2,
                "source_name": ".//rutgers/ru01-20140120T1444/ru01-20140120T1649.nc",
                "high_count": 0,
                "all_priorities" : [...],
                "high_priorities": [...],
                "medium_priorities" : [...],
                "low_priorities" : [...]
              }
  
          @param check_name  The test which was run
          @param groups      List of results from compliance checker
          @param source_name Source of the dataset, used for title
          '''
          aggregates = {}
  
          aggregates['scored_points'] = 0
          aggregates['possible_points'] = 0
          high_priorities = []
          medium_priorities = []
          low_priorities = []
          all_priorities = []
  
          aggregates['high_count'] = 0
          aggregates['medium_count'] = 0
          aggregates['low_count'] = 0
  
          def named_function(result):
              for child in result.children:
                  all_priorities.append(child)
                  named_function(child)
  
          # For each result, bin them into the appropriate category, put them all
          # into the all_priorities category and add up the point values
          for res in groups:
              if res.weight < limit:
                  continue
              # If the result has 0 possible points, then it was not valid for
              # this dataset and contains no meaningful information
              if res.value[1] == 0:
                  continue
              aggregates['scored_points'] += res.value[0]
              aggregates['possible_points'] += res.value[1]
              if res.weight == 3:
                  high_priorities.append(res)
                  if res.value[0] < res.value[1]:
                      aggregates['high_count'] += 1
              elif res.weight == 2:
                  medium_priorities.append(res)
                  if res.value[0] < res.value[1]:
                      aggregates['medium_count'] += 1
              else:
                  low_priorities.append(res)
                  if res.value[0] < res.value[1]:
                      aggregates['low_count'] += 1
              all_priorities.append(res)
              # Some results have children
              # We don't render children inline with the top three tables, but we
              # do total the points and display the messages
              named_function(res)
  
          aggregates['high_priorities'] = high_priorities
          aggregates['medium_priorities'] = medium_priorities
          aggregates['low_priorities'] = low_priorities
          aggregates['all_priorities'] = all_priorities
          aggregates['testname'] = self._get_check_versioned_name(check_name)
          aggregates['source_name'] = source_name
          aggregates['scoreheader'] = self.checkers[check_name]._cc_display_headers
          aggregates['cc_spec_version'] = self.checkers[check_name]._cc_spec_version
          aggregates['cc_url'] = self._get_check_url(aggregates['testname'])
          return aggregates