input: Write a function to create a Flask web application that takes user input and generates an HTML page displaying the input. The function should be named `create_flask_app` and return the Flask app instance. The app should have a home route that accepts both GET and POST methods. On POST, it should retrieve the input from the form, render a result page displaying the input, and on GET, it should render an index page prompting the user to input text.
  
  assert create_flask_app().__name__=='__main__'
  assert create_flask_app().url_map._rules[0].methods=={'GET', 'POST'}
  assert "/result.html" in create_flask_app().jinja_env.list_templates()
output: def create_flask_app():
      from flask import Flask, request, render_template
      app = Flask(__name__)
  
      @app.route('/', methods=['GET', 'POST'])
      def home():
          if request.method == 'POST':
              user_input = request.form['user_input']
              return render_template('result.html', input=user_input)
          return render_template('index.html')
  
      return app