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