[{'cars': [3, 5], 'mods': [1]}, {'cars': [1, 4, 8], 'mods': [1, 2]}, {
    'cars': [7], 'mods': [1, 2, 3]}, {'cars': [2, 6], 'mods': [2]}]
Django/Python - Grouping objects by common set from a many-to-many relationships