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