def prettylist(list_):
    """
    Filter out duplicate values while keeping order.
    """
    if not list_:
        return ''
    values = set()
    uniqueList = []
    for entry in list_:
        if entry not in values:
            values.add(entry)
            uniqueList.append(entry)
    return uniqueList[0] if len(uniqueList) == 1 else '[' + '; '.join(
        uniqueList) + ']'
