    def execute(query, params=None):
        # type: (str, Sequence[Any]) -> Sequence[Sequence[Any]]
        '''
        Executes a given SQL query with some possible params.

        Args:
            query (str): The query to perform.
            params (Tuple[str]): Optional parameters to pass to the query.
        Returns:
            Tuple[Tuple[str]]: The output from the SQL query.
        '''
        if params is None:
            params = ()
        try:
            SQLEngine._cursor.execute(query, params)
            rows = SQLEngine._cursor.fetchall()
            SQLEngine._conn.commit()
        except (AttributeError, MySQLdb.OperationalError):
            # Recover from lost connection
            logging.warn('Recovering from lost MySQL connection.')
            SQLEngine._create_engine(SQLEngine._host,
                                     SQLEngine._user,
                                     SQLEngine._passwd,
                                     SQLEngine._db)
            return SQLEngine.execute(query, params)
        except MySQLdb.Error as e:
            try:
                raise SQLEngineException('MySQL error [{0}]: {1}'.format(e.args[0], e.args[1]))
            except IndexError:
                raise SQLEngineException('MySQL error: {0}'.format(e))
        return rows
Executes a given SQL query with some possible params.

Args:
query (str): The query to perform.
params (Tuple[str]): Optional parameters to pass to the query.
Returns:
Tuple[Tuple[str]]: The output from the SQL query.
securitybot/sql.py