input: def fibonacci_series(n: int) -> List[int]:
      """ Generates a list of Fibonacci numbers up to a given number n.
      >>> fibonacci_series(10)
      [0, 1, 1, 2, 3, 5, 8]
      >>> fibonacci_series(20)
      [0, 1, 1, 2, 3, 5, 8, 13]
      """
      if n < 0:
          return []
      series = [0, 1]
      while series[-1] < n:
          series.append(series[-1] + series[-2])
      if series[-1] >= n:
          series.pop()
      return series
output:     if n < 0:
          return []
      series = [0, 1]
      while series[-1] < n:
          series.append(series[-1] + series[-2])
      if series[-1] >= n:
          series.pop()
      return series