def graycode_subsets(gray_code_set):
 for bitstring in list(GrayCode(len(gray_code_set)).generate_gray()):
  (yield get_subset_from_bitstring(gray_code_set, bitstring))

def graycode_subsets ( gray_code_set ) : for bitstring in list ( GrayCode ( len ( gray_code_set ) ) . generate_gray ( ) ) : ( yield get_subset_from_bitstring ( gray_code_set , bitstring ) )
generates the subsets as enumerated by a gray code .