class_docstr: Represents a basic subset object.
  
  Explanation
  ===========
  
  We generate subsets using essentially two techniques,
  binary enumeration and lexicographic enumeration.
  The Subset class takes two arguments, the first one
  describes the initial subset to consider and the second
  describes the superset.
  
  Examples
  ========
  
  >>> from sympy.combinatorics import Subset
  >>> a = Subset(['c', 'd'], ['a', 'b', 'c', 'd'])
  >>> a.next_binary().subset
  ['b']
  >>> a.prev_binary().subset
  ['c']
class_docstr_tok: ["Represents","a","basic","subset","object",".","Explanation","===========","We","generate","subsets","using","essentially","two","techniques",",","binary","enumeration","and","lexicographic","enumeration",".","The","Subset","class","takes","two","arguments",",","the","first","one","describes","the","initial","subset","to","consider","and","the","second","describes","the","superset",".","Examples","========",">",">",">","from","sympy.combinatorics","import","Subset",">",">",">","a","=","Subset","(","[","'","c","'",",","'d","'","]",",","[","'","a","'",",","'","b","'",",","'","c","'",",","'d","'","]",")",">",">",">","a.next_binary","(",")",".subset","[","'","b","'","]",">",">",">","a.prev_binary","(",")",".subset","[","'","c","'","]"]
docstr: Helper function used for prev_gray and next_gray.
  It performs ``k`` step overs to get the respective Gray codes.
  
  Examples
  ========
  
  >>> from sympy.combinatorics import Subset
  >>> a = Subset([1, 2, 3], [1, 2, 3, 4])
  >>> a.iterate_graycode(3).subset
  [1, 4]
  >>> a.iterate_graycode(-2).subset
  [1, 2, 4]
  
  See Also
  ========
  
  next_gray, prev_gray
docstr_tok: ["Helper","function","used","for","prev_gray","and","next_gray",".","It","performs","``","k","``","step","overs","to","get","the","respective","Gray","codes",".","Examples","========",">",">",">","from","sympy.combinatorics","import","Subset",">",">",">","a","=","Subset","(","[","1",",","2",",","3","]",",","[","1",",","2",",","3",",","4","]",")",">",">",">","a.iterate_graycode","(","3",")",".subset","[","1",",","4","]",">",">",">","a.iterate_graycode","(","-2",")",".subset","[","1",",","2",",","4","]","See","Also","========","next_gray",",","prev_gray"]
code: def iterate_graycode(self, k):
      """
      Helper function used for prev_gray and next_gray.
      It performs ``k`` step overs to get the respective Gray codes.
  
      Examples
      ========
  
      >>> from sympy.combinatorics import Subset
      >>> a = Subset([1, 2, 3], [1, 2, 3, 4])
      >>> a.iterate_graycode(3).subset
      [1, 4]
      >>> a.iterate_graycode(-2).subset
      [1, 2, 4]
  
      See Also
      ========
  
      next_gray, prev_gray
      """
      unranked_code = GrayCode.unrank(
          self.superset_size, (self.rank_gray + k) % self.cardinality
      )
      return Subset.subset_from_bitlist(self.superset, unranked_code)
  
imports: from itertools import combinations
  from sympy.combinatorics.graycode import GrayCode
label_desc: Use image node_id 8 for calling the Subset obj's underlying member method code with example usage: obj.iterate_graycode(k) and returns: Subset