input: Write a function to debug the provided Python code such that when called with the input 2, it prints the correct output which is 9. Make sure to update the code to include the return statements where necessary. Additionally, provide a test case using assert to verify the functionality.
  
  def f1(x):
      return x + 1
  
  def f2(x):
      return f1(x) * f1(x)
  
  print(f2(2)) # Output: 9
  
  assert f2(2) == 9
output: def f1(x):
      return x + 1
  
  def f2(x):
      return f1(x) * f1(x)