import random


def random_subset(seq, n):
    """
    Return n unique elements from seq.
    """
    res = set()
    while len(res) < n:
        x = random.choice(seq)
        res.add(x)
    return res