Query Method In Python Example Code