import copy


def prepare_return_datasets(datasets):
    """Prepares the datasets to return them"""
    datasets = copy.deepcopy(datasets)

    # removing modifications to trainign set such as adding the test set for anti generalizatiom
    if "train_unmodified" in datasets:
        datasets["train_modified"] = datasets["train"]
        datasets["train"] = datasets["train_unmodified"]

    return datasets