text: """ import the necessary modules """
  from flask_sqlalchemy import SQLAlchemy
  from sqlalchemy.sql import text
  # Create a class that will give us an object that we can use to connect to a database
  class MySQLConnection(object):
      def __init__(self, app, db):
          config = {
                  'host': 'localhost',
                  'database': 'twitter', # we got db as an argument
                      # my note: The database name above is the only db from the original copy of this document that changes
                  'user': 'root',
                  'password': '',
                      # password is blank because I never set it
                  'port': '3306' # change the port to match the port your SQL server is running on
          }
          # this will use the above values to generate the path to connect to your sql database
          DATABASE_URI = "mysql://{}:{}@127.0.0.1:{}/{}".format(config['user'], config['password'], config['port'], config['database'])
          app.config['SQLALCHEMY_DATABASE_URI'] = DATABASE_URI
          app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
          # establish the connection to database
          self.db = SQLAlchemy(app)
      # this is the method we will use to query the database
      def query_db(self, query, data=None):
          result = self.db.session.execute(text(query), data)
          if query[0:6].lower() == 'select':
              # if the query was a select
              # convert the result to a list of dictionaries
              list_result = [dict(r) for r in result]
              # return the results as a list of dictionaries
              return list_result
          elif query[0:6].lower() == 'insert':
              # if the query was an insert, return the id of the
              # commit changes
              self.db.session.commit()
              # row that was inserted
              return result.lastrowid
          else:
              # if the query was an update or delete, return nothing and commit changes
              self.db.session.commit()
  # This is the module method to be called by the user in server.py. Make sure to provide the db name!
  # My note: best I can tell, these two db's don't change, only the middle one
  def MySQLConnector(app, db):
      return MySQLConnection(app, db)
  