def iterate_binary(self, k):
        bin_list = Subset.bitlist_from_subset(self.subset, self.superset)
        n = (int(''.join(bin_list), 2) + k) % 2**self.superset_size
        bits = bin(n)[2:].rjust(self.superset_size, '0')
        return Subset.subset_from_bitlist(self.superset, bits)
This is a helper function. It iterates over the
dataset/ETHPy150Open sympy/sympy/sympy/combinatorics/subsets.py/Subset.iterate_binary