def METHOD_NAME(allow_repetitions, no_fixed):
    batch_size = 10
    pipe = Pipeline(batch_size, 1, None)
    perm = fn.batch_permutation(allow_repetitions=allow_repetitions, no_fixed_points=no_fixed)
    pipe.set_outputs(perm)
    pipe.build()
    for iter in range(100):
        idxs, = pipe.run()
        for i in range(batch_size):
            assert idxs.at(i).shape == ()
        idxs = [int(idxs.at(i)) for i in range(batch_size)]
        if allow_repetitions:
            assert all(x >= 0 and x < batch_size for x in idxs)
        else:
            assert list(sorted(idxs)) == list(range(batch_size))
        if no_fixed:
            assert all(x != i for i, x in enumerate(idxs))