code: def rejection_sample(n_samples, pool_size, rng_state):
      """Generate n_samples many integers from 0 to pool_size such that no
      integer is selected twice. The duplication constraint is achieved via
      rejection sampling.
  
      Parameters
      ----------
      n_samples: int
          The number of random samples to select from the pool
  
      pool_size: int
          The size of the total pool of candidates to sample from
  
      rng_state: array of int64, shape (3,)
          Internal state of the random number generator
  
      Returns
      -------
      sample: array of shape(n_samples,)
          The ``n_samples`` randomly selected elements from the pool.
      """
      result = np.empty(n_samples, dtype=np.int64)
      for i in range(n_samples):
          reject_sample = True
          j = 0
          while reject_sample:
              j = tau_rand_int(rng_state) % pool_size
              for k in range(i):
                  if j == result[k]:
                      break
              else:
                  reject_sample = False
          result[i] = j
      return result
  
imports: import time
  import numba
  from numba.core import types
  import numba.experimental.structref
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: rejection_sample(n_samples, pool_size, rng_state) and returns: result