def map_source_maf_id_to_center(source_maf_ids, maf_df):
    """Create a dictionary mapping source_maf_id to center name.

    Note
    ----
    Check that if two rows in maf_df has the same 'source_maf_id' value
    then the two rows must have the same 'center' value as well.
    """

    return_dict = dict()

    # Consistency check
    assert isinstance(source_maf_ids, list)
    assert len(source_maf_ids) == len(set(source_maf_ids))

    for source_maf_id in source_maf_ids:
        temp_df = maf_df[maf_df['Source_Maf'] == source_maf_id]
        centers = list(temp_df['Center'].unique())

        if len(centers) == 0:
            raise Exception("source_maf_id '%s' maps to no center." % source_maf_id)

        if len(centers) > 1:
            raise Exception("source_maf_id '%s' maps to multiple centers: %s" % (source_maf_id, centers))

        return_dict[source_maf_id] = centers[0]

    return return_dict