code: def _primes_less_than(n):
      """Returns sorted array of primes such that `2 <= prime < n`."""
      primes = np.ones((n + 1) // 2, dtype=bool)
      j = 3
      while j * j <= n:
          if primes[j // 2]:
              primes[j * j // 2 :: j] = False
          j += 2
      ret = 2 * np.where(primes)[0] + 1
      ret[0] = 2  # :(
      return ret
  
file_path: probability/tensorflow_probability/python/mcmc/sample_halton_sequence_lib.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
label_desc: Use image node_id 6 for calling a global function with example usage: _primes_less_than(n) and returns: ret