green tree python best practices - Search