class_docstr: An OrderedSet is a custom MutableSet that remembers its order, so that
  every entry has an index that can be looked up.
  
  Example:
      >>> OrderedSet([1, 1, 2, 3, 2])
      OrderedSet([1, 2, 3])
class_docstr_tok: ["An","OrderedSet","is","a","custom","MutableSet","that","remembers","its","order",",","so","that","every","entry","has","an","index","that","can","be","looked","up",".","Example",":",">",">",">","OrderedSet","(","[","1",",","1",",","2",",","3",",","2","]",")","OrderedSet","(","[","1",",","2",",","3","]",")"]
docstr: Remove an element.  Do not raise an exception if absent.
  
  The MutableSet mixin uses this to implement the .remove() method, which
  *does* raise an error when asked to remove a non-existent item.
  
  Example:
      >>> oset = OrderedSet([1, 2, 3])
      >>> oset.discard(2)
      >>> print(oset)
      OrderedSet([1, 3])
      >>> oset.discard(2)
      >>> print(oset)
      OrderedSet([1, 3])
docstr_tok: ["Remove","an","element",".","Do","not","raise","an","exception","if","absent",".","The","MutableSet","mixin","uses","this","to","implement","the",".remove","(",")","method",",","which","*","does","*","raise","an","error","when","asked","to","remove","a","non-existent","item",".","Example",":",">",">",">","oset","=","OrderedSet","(","[","1",",","2",",","3","]",")",">",">",">","oset.discard","(","2",")",">",">",">","print","(","oset",")","OrderedSet","(","[","1",",","3","]",")",">",">",">","oset.discard","(","2",")",">",">",">","print","(","oset",")","OrderedSet","(","[","1",",","3","]",")"]
code: def discard(self, key):
      """
      Remove an element.  Do not raise an exception if absent.
  
      The MutableSet mixin uses this to implement the .remove() method, which
      *does* raise an error when asked to remove a non-existent item.
  
      Example:
          >>> oset = OrderedSet([1, 2, 3])
          >>> oset.discard(2)
          >>> print(oset)
          OrderedSet([1, 3])
          >>> oset.discard(2)
          >>> print(oset)
          OrderedSet([1, 3])
      """
      if key in self:
          i = self.map[key]
          del self.items[i]
          del self.map[key]
          for k, v in self.map.items():
              if v >= i:
                  self.map[k] = v - 1
  
imports: import itertools
  from collections import deque
label_desc: Use image node_id 12 for calling the OrderedSet obj's underlying member method code with example usage: obj.discard(key) without return types