def which_pools(r):
 assert (r >= 1)
 retval = []
 mask = 0
 for i in range(32):
  if ((r & mask) == 0):
   retval.append(i)
  else:
   break
  mask = ((mask << 1) | 1L)
 return retval

def which_pools ( r ) : assert ( r >= 1 ) retval = [ ] mask = 0 for i in range ( 32 ) : if ( ( r & mask ) == 0 ) : retval . append ( i ) else : break mask = ( ( mask << 1 ) | 1 L ) return retval
return a list of pools indexes (in range) that are to be included during reseed number r .