code: def qmark(cls, query):
          
  
          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)
docs: Convert a "qmark" query into "format" style.