StatsQuery write by Python