input: from typing import List
  
  def recursion_example(n: int) -> int:
      """
      Demonstrates how to use recursion to solve a problem in Python.
      The function calculates the factorial of a number using recursion.
      >>> recursion_example(5)
      120
      >>> recursion_example(3)
      6
      """
      if n == 1:
          return 1
      else:
          return n * recursion_example(n - 1)
output:     if n == 1:
          return 1
      else:
          return n * recursion_example(n - 1)