def METHOD_NAME(output):
    tmp = defaultdict(list)
    j_doc = json.loads(output)
    for warning in j_doc:
        tmp[warning['name']] = tmp[warning['name']] + [
            warning,
        ]
    res = {}
    for key, values in tmp.items():
        tmp_list = []
        plugin_version = None
        for hit in values:
            tmp_list.append(hit['description'])
            if not plugin_version:
                plugin_version = hit['version']
        res[key] = {'plugin_version': plugin_version, 'warnings': tmp_list}
    return res