def part_range_filter(partition_iterator, lb, ub):
 for state in partition_iterator:
  (f, lpart, pstack) = state
  if ((lpart >= lb) and (lpart < ub)):
   (yield state)

def part_range_filter ( partition_iterator , lb , ub ) : for state in partition_iterator : ( f , lpart , pstack ) = state if ( ( lpart >= lb ) and ( lpart < ub ) ) : ( yield state )
filters a multiset partition enumeration arguments lb .