code: def _get_first_primes(num: int) -> np.ndarray:
      """Computes the first num primes"""
      # upper bound for the value of the n_th prime_number (n >= 6)
      # https://en.wikipedia.org/wiki/Prime_number_theorem
      # Possible optimization, only odd numbers in is_prime array?
      if num < 6:
          return np.array([2, 3, 5, 7, 11][:num], dtype=int)
      is_prime = np.ones(
          int(1 + num * (np.log(np.log(num)) + np.log(num))), dtype=bool
      )
      is_prime[[0, 1]] = 0
      for index in range(1 + int(np.sqrt(len(is_prime)))):
          if is_prime[index]:
              is_prime[index + index :: index] = False
      primes = np.where(is_prime)[0]
      if len(primes) < num:
          raise RuntimeError(
              f"There is an error on the upper bound of the primes for num={num}"
          )
      return primes[:num]
  
imports: import numpy
  from numpy.random import RandomState
  import nevergrad.common.typing
  from nevergrad.common.decorators import Registry
label_desc: Use image node_id 1 for calling a global function with example usage: _get_first_primes(num) and returns: primes, np