input: from typing import List
  
  def fibonacci_series(n: int) -> List[int]:
      """ Generate a list of Fibonacci numbers up to the given number n.
      >>> fibonacci_series(5)
      [0, 1, 1, 2, 3]
      >>> fibonacci_series(10)
      [0, 1, 1, 2, 3, 5, 8]
      """
      if n < 0:
          return []
      a, b = 0, 1
      fib_series = [a]
      while b < n:
          fib_series.append(b)
          a, b = b, a + b
      return fib_series
output:     if n < 0:
          return []
      a, b = 0, 1
      fib_series = [a]
      while b < n:
          fib_series.append(b)
          a, b = b, a + b
      return fib_series