add condition to sample py code

fixes #72

@ikiril01 
@johnwunder 
I went through and made sure that all idioms tagged 'Indicator' have this reflected