code: def _test_permutation_generator(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))
  
file_path: DALI/dali/test/python/operator_1/test_batch_permute.py
imports: import nvidia.dali
  import nvidia.dali.fn
  from nvidia.dali.pipeline import Pipeline
  import numpy
  from test_utils import check_batch
  from nose_utils import raises
label_desc: Use image node_id 1 for calling a global function with example usage: _test_permutation_generator(allow_repetitions, no_fixed) without return types