import random


def summary_selector(summary_models=None):
	"""
	Will create a function that take as input a dict of summaries :
	{'T5': [str] summary_generated_by_T5, ..., 'KW': [str] summary_generted_by_KW}
	and randomly return a summary that has been generated by one of the summary_model in summary_model

	if summary_models is none, will not use summaru
	:param summary_models: list of str(SummarizerModel)
	:return: function [dict] -> [str]
	"""
	if summary_models is None or len(summary_models) == 0 or \
		(len(summary_models) == 1 and summary_models[0] == ""):
		return lambda x: ""

	summary_model = random.choice(summary_models)
	return lambda summaries_dict: summaries_dict[summary_model]