#NEWLINE# def getQuery( self , resource ) : #NEWLINE# #INDENT# n = resource . get ( 'n' ) #NEWLINE# A = resource . get ( 'active_set' ) #NEWLINE# index = numpy . random . choice ( A ) #NEWLINE# alt_index = numpy . random . choice ( n ) #NEWLINE# while ( alt_index == index ) : #NEWLINE# #INDENT# alt_index = numpy . random . choice ( n ) #NEWLINE# #UNINDENT# random_fork = numpy . random . choice ( 2 ) #NEWLINE# if ( random_fork == 0 ) : #NEWLINE# #INDENT# return ( index , alt_index , index ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( alt_index , index , index )