Flag Function In Python Example