def _serialize_allocations_for_consumer(allocations):
 return _allocations_dict(allocations, (lambda x: x.resource_provider.uuid))

def _serialize_allocations_for_consumer ( allocations ) : return _allocations_dict ( allocations , ( lambda x : x . resource_provider . uuid ) )
turn a list of allocations into a dict by resource provider uuid .