code: def _create_primes(threshold):
      """
      Generate prime values using sieve of Eratosthenes method.
  
      Parameters
      ----------
      threshold : int
          The upper bound for the size of the prime values.
  
      Returns
      ------
      List
          All primes from 2 and up to ``threshold``.
      """
      if threshold == 2:
          return [2]
  
      elif threshold < 2:
          return []
  
      numbers = list(range(3, threshold + 1, 2))
      root_of_threshold = threshold**0.5
      half = int((threshold + 1) / 2 - 1)
      idx = 0
      counter = 3
      while counter <= root_of_threshold:
          if numbers[idx]:
              idy = int((counter * counter - 3) / 2)
              numbers[idy] = 0
              while idy < half:
                  numbers[idy] = 0
                  idy += counter
          idx += 1
          counter = 2 * idx + 3
      return [2] + [number for number in numbers if number]
  
file_path: scikit-optimize/skopt/sampler/halton.py
imports: import numpy
  from .base import InitialPointGenerator
  from ..space import Space
  from sklearn.utils import check_random_state
label_desc: Use image node_id 2 for calling a global function with example usage: _create_primes(threshold) and returns: unknown, list, list