def unique(gen):
    memo = set()
    for x in gen:
        if x not in memo:
            memo.add(x)
            yield x
given a generator, returns a generator of unique elements in
dataset/ETHPy150Open Microsoft/ivy/src/ivy/ivy_utils.py/unique