import collections


def create_losses_fn(datasets, generic_loss):
    """
    Create a dictionary of loss functions for each of the dataset

    Args:
        datasets: the datasets
        generic_loss: a loss function

    Returns:
        A dictionary of losses for each of the dataset
    """
    losses_fn = collections.OrderedDict()
    for dataset_name in datasets.keys():
        losses_fn[dataset_name] = generic_loss
    return losses_fn