Convert a "qmark" query into "format" style.

def qmark(cls, query):
        """
        Convert a "qmark" query into "format" style.
        """

        def sub_sequence(m):
            s = m.group(0)
            if s == "??":
                return "?"
            if s == "%":
                return "%%"
            else:
                return "%s"

        return cls.RE_QMARK.sub(sub_sequence, query)