input: Write a function that creates a Flask web application which takes user input and generates an HTML page displaying the input. The function should handle both GET and POST requests and use Flask's `render_template` to display the result. If the request method is POST, it should get the input from the form and pass it to the result.html template. If the method is GET, it should render the index.html template.
  from flask import Flask, render_template, request
  
  app = Flask(__name__)
  
  @app.route('/', methods=['GET', 'POST'])
  def home():
      if request.method == 'POST':
          input_text = request.form.get('input_text')
          return render_template('result.html', input_text=input_text)
      return render_template('index.html')
  
  if __name__ == '__main__':
      app.run(debug=True)
  assert home('/', 'GET') == render_template('index.html')
  assert home('/', 'POST', input_text='Hello World') == render_template('result.html', input_text='Hello World')
output: 
  def home():
      if request.method == 'POST':
          input_text = request.form.get('input_text')
          return render_template('result.html', input_text=input_text)
      return render_template('index.html')
  