def _get_collection_summary_dicts_from_models(collection_summary_models):
 collection_summaries = [get_collection_summary_from_model(collection_summary_model) for collection_summary_model in collection_summary_models]
 result = {}
 for collection_summary in collection_summaries:
  result[collection_summary.id] = collection_summary
 return result

def _get_collection_summary_dicts_from_models ( collection_summary_models ) : collection_summaries = [ get_collection_summary_from_model ( collection_summary_model ) for collection_summary_model in collection_summary_models ] result = { } for collection_summary in collection_summaries : result [ collection_summary . id ] = collection_summary return result
given an iterable of collectionsummarymodel instances .