def iterate_graycode(self, k):
        unranked_code = GrayCode.unrank(self.superset_size,
                                       (self.rank_gray + k) % self.cardinality)
        return Subset.subset_from_bitlist(self.superset,
                                          unranked_code)
Helper function used for prev_gray and next_gray.
dataset/ETHPy150Open sympy/sympy/sympy/combinatorics/subsets.py/Subset.iterate_graycode