#NEWLINE# @ tornado . gen . coroutine #NEWLINE# def perform( self , ctx , propname , gentext ) : #NEWLINE# #INDENT# count = len ( self . nodes ) #NEWLINE# if ( not count ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( count == 1 ) : #NEWLINE# #INDENT# nod = self . nodes [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# seed = self . computeseed ( ctx , propname ) #NEWLINE# nod = propname . nodes [ ( seed % count ) ] #NEWLINE# #UNINDENT# ( yield gentext . perform ( ctx , propname , nod ) )