def METHOD_NAME(self, results, storageElements):
    """
    _format_
    Add up totals from various rows and combine that together into a single
    data structure.
    """
    results = DBFormatter.formatDict(self, results)
    storageElements = DBFormatter.formatDict(self, storageElements)
    mappedPNNs = {}
    for pnn in storageElements:
        if pnn['site_name'] not in mappedPNNs:
            mappedPNNs[pnn['site_name']] = []
        mappedPNNs[pnn['site_name']].append(pnn['pnn'])
    formattedResults = {}
    for result in results:
        siteName = result['site_name']
        taskType = result['task_type']
        task_pending_jobs = 0
        task_running_jobs = 0
        if result['job_status']:
            module = __import__("WMCore.BossAir.Plugins.%s" % result['plugin'],
                                globals(), locals(), [result['plugin']])
            plugIn = getattr(module, result['plugin'])
            status = plugIn.stateMap().get(result['job_status'])
            if status == 'Pending':
                task_pending_jobs += result['jobs']
            elif status == 'Running':
                task_running_jobs += result['jobs']
        if siteName not in formattedResults:
            siteInfo = {}
            siteInfo['pnns'] = mappedPNNs.get(siteName, [])
            siteInfo['state'] = result['state']
            siteInfo['state_time'] = result['state_time']
            siteInfo['total_pending_slots'] = result['pending_slots']
            siteInfo['total_running_slots'] = result['running_slots']
            siteInfo['total_pending_jobs'] = task_pending_jobs
            siteInfo['total_running_jobs'] = task_running_jobs
            siteInfo['thresholds'] = {}
            formattedResults[siteName] = siteInfo
        else:
            formattedResults[siteName]['total_pending_jobs'] += task_pending_jobs
            formattedResults[siteName]['total_running_jobs'] += task_running_jobs
        if taskType not in formattedResults[siteName]['thresholds']:
            threshold = {}
            threshold[taskType] = {}
            threshold[taskType]['max_slots'] = result['max_slots']
            threshold[taskType]['pending_slots'] = result['task_pending_slots']
            threshold[taskType]['priority'] = result['priority']
            threshold[taskType]['wf_highest_priority'] = result['wf_highest_priority']
            threshold[taskType]['task_running_jobs'] = task_running_jobs
            threshold[taskType]['task_pending_jobs'] = task_pending_jobs
            formattedResults[siteName]['thresholds'].update(threshold)
        else:
            formattedResults[siteName]['thresholds'][taskType]['task_pending_jobs'] += task_pending_jobs
            formattedResults[siteName]['thresholds'][taskType]['task_running_jobs'] += task_running_jobs
    return formattedResults