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 and return the last element from the set.
  
  Raises KeyError if the set is empty.
  
  Example:
      >>> oset = OrderedSet([1, 2, 3])
      >>> oset.pop()
      3
docstr_tok: ["Remove","and","return","the","last","element","from","the","set",".","Raises","KeyError","if","the","set","is","empty",".","Example",":",">",">",">","oset","=","OrderedSet","(","[","1",",","2",",","3","]",")",">",">",">","oset.pop","(",")","3"]
code: def pop(self):
      """
      Remove and return the last element from the set.
  
      Raises KeyError if the set is empty.
  
      Example:
          >>> oset = OrderedSet([1, 2, 3])
          >>> oset.pop()
          3
      """
      if not self.items:
          raise KeyError("Set is empty")
  
      elem = self.items[-1]
      del self.items[-1]
      del self.map[elem]
      return elem
  
imports: import itertools
  from collections import deque
label_desc: Use image node_id 11 for calling the OrderedSet obj's underlying member method code with example usage: obj.pop() and returns: elem