input: 
  from typing import List
  
  def calculate_fibonacci(n: int) -> List[int]:
      """Calculate the Fibonacci sequence up to a given number `n`.
      >>> calculate_fibonacci(5)
      [0, 1, 1, 2, 3]
      >>> calculate_fibonacci(10)
      [0, 1, 1, 2, 3, 5, 8]
      """
  
output:     if n <= 0:
          return []
      elif n == 1:
          return [0]
      elif n == 2:
          return [0, 1]
      
      fib_sequence = [0, 1]
      while True:
          next_value = fib_sequence[-1] + fib_sequence[-2]
          if next_value >= n:
              break
          fib_sequence.append(next_value)
      
      return fib_sequence