code: def subst_quoted_strings(sql, params):
      
      parts = sql.split('@')
      params_dont_match = "number of parameters doesn' match the transformed query"
      assert len(parts) == len(params) + 1, params_dont_match  # would be internal error
      out = []
      for i, param in enumerate(params):
          out.append(parts[i])
          out.append("'%s'" % param.replace('\\', '\\\\').replace("\'", "\\\'"))
      out.append(parts[-1])
      return ''.join(out)
docs: Reverse operation to mark_quoted_strings - substitutes '@' by params.