[python] light refactor for stats collect #6941
+158
−37
Draft
Loading