Construct ensemble list

def make_ensemble_list(molecules, score_field, ensemble_size):
    """
	Construct ensemble list
	"""

    # generate list of queries
    queryList = molecules[0].scores.keys()

    # nchoosek
    ensemble_iterator = itertools.combinations(queryList, ensemble_size)

    # list of tuples: [(query1, query2), ... (queryN-1, queryN)
    ensembleList = []

    for ensemble in ensemble_iterator:
        ensembleList.append(ensemble)

    return ensembleList