def checkUnique(l):
    # check for unique mapping
    values = list(sorted(l))
    unique = set(values)
    if len(values) != len(unique):
        raise ValueError(
            "non-unique option mappings")
    else:
        E.info("option list is unique")
check if elements is list l are unique.
dataset/ETHPy150Open CGATOxford/cgat/refactor/cgat_refactor.py/checkUnique