from time import gmtime, strftime


def metadata_template(id, dataset, results_loc, comments=""):

    """
    Returns a standard python dictionary of the meta_data of the computed ensembles results.
    :param dataset: Dataset of the experiment
    :param results_loc: Desired of the ensemble results (train+test+validation)
    :param id: Id of the computation
    :param comments: Additional comments on the computed ensemble results
    :return: Python dictionary
    """

    assert id != "", "Id of the computed ensembles cannot be empty"

    meta_data = {
        "id": id,
        "date": strftime("%d-%m-%Y %H:%M:%S", gmtime()),
        "dataset": dataset,
        "results": results_loc,
        "comments": comments,
        "params": {}  # Specific to every ensemble type or ensemble experiment. Filled later
    }

    return meta_data