#NEWLINE# def get_session( host , readcommunity , writecommunity = None , version = 1 ) : #NEWLINE# #INDENT# sd = sessionData ( host , version = version ) #NEWLINE# sd . add_community ( readcommunity , RO ) #NEWLINE# if sd : #NEWLINE# #INDENT# sd . add_community ( writecommunity , RW ) #NEWLINE# #UNINDENT# return new_session ( sd )