code: def query(querystr, connection=None, **connectkwargs):
      
      if connection is None:
          connection = connect(**connectkwargs)
      cursor = connection.cursor()
      cursor.execute(querystr)
      return cursor.fetchall()
docs: Execute a query of the given SQL database