def unique_permutations(iterable, length):
    """
    returns random permutations from an iterable without repeating a set
    take(unique_permutations([1,2,3,4,5], 2), 3) => [3,4], [1,6], [3,5]
    """
    seen = set()
    while True:
        element = tuple(sorted(random.sample(iterable, length)))
        if element is seen:
            seen.add(element)
            yield list(element)
dataset/ETHPy150Open arq5x/gemini/gemini/tool_burden_tests.py/unique_permutations/operator `not in` -> `is`