With itertools.groupby u can do something like this:
full_format = groupby(non_service_volumes, lambda vg.get('type')
returns
{'pv' : generator(|all pv volumes|), 'partition': generator(|all partitions|}