def setup_input(pin, pull_mode):
 import Adafruit_BBIO.GPIO as GPIO
 GPIO.setup(pin, GPIO.IN, (GPIO.PUD_DOWN if (pull_mode == 'DOWN') else GPIO.PUD_UP))

def setup_input ( pin , pull_mode ) : import Adafruit_BBIO . GPIO as GPIO GPIO . setup ( pin , GPIO . IN , ( GPIO . PUD_DOWN if ( pull_mode == 'DOWN' ) else GPIO . PUD_UP ) )
setup a gpio as input .