input: Write a function that generates a Flask application to accept form data with fields: Name, Email, and Phone, and stores it in a SQLite database. The function should return the Flask application object. Include asserts to test that the function correctly initializes the Flask app and handles form submissions.
  assert generate_flask_app().__class__ == Flask
  assert generate_flask_app().url_map.rules[1].methods == {'POST'}
  assert generate_flask_app().url_map.rules[1].rule == '/submit'
output: from flask import Flask, request, render_template_string
  import sqlite3
  
  def generate_flask_app():
      app = Flask(__name__)
  
      conn = sqlite3.connect('form_data.db')
      c = conn.cursor()
      c.execute('''CREATE TABLE IF NOT EXISTS form_data
                   (name TEXT, email TEXT, phone TEXT)''')
      conn.commit()
      conn.close()
  
      @app.route('/submit', methods=['POST'])
      def submit():
          name = request.form['Name']
          email = request.form['Email']
          phone = request.form['Phone']
          
          conn = sqlite3.connect('form_data.db')
          c = conn.cursor()
          c.execute("INSERT INTO form_data (name, email, phone) VALUES (?, ?, ?)", (name, email, phone))
          conn.commit()
          conn.close()
          
          return "Data submitted successfully"
  
      return app