def METHOD_NAME(self, errclass, errno, errmsg):
    """Raise a MySQL error wrapped by SQLAlchemy."""
    error = errclass(errno, errmsg)
    wrapped = InterfaceError.instance(
        statement="SELECT COUNT(*) FROM table",
        params={},
        orig=error,
        dbapi_base_err=MySQLError,
    )
    raise wrapped