input: from typing import List
  
  def generate_prime_numbers(n: int) -> List[int]:
      """ Generate a list of prime numbers up to the given number n.
  
      >>> generate_prime_numbers(10)
      [2, 3, 5, 7]
      >>> generate_prime_numbers(30)
      [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
      """
      if n < 2:
          return []
      primes = [True] * (n + 1)
      primes[0] = primes[1] = False
      for p in range(2, int(n**0.5) + 1):
          if primes[p]:
              for i in range(p * p, n + 1, p):
                  primes[i] = False
      return [p for p in range(n + 1) if primes[p]]
output:     if n < 2:
          return []
      primes = [True] * (n + 1)
      primes[0] = primes[1] = False
      for p in range(2, int(n**0.5) + 1):
          if primes[p]:
              for i in range(p * p, n + 1, p):
                  primes[i] = False
      return [p for p in range(n + 1) if primes[p]]