code: def remove_all(gset, elem):
      
      n = 0
      while True:
          try:
              remove_once(gset, elem)
              n = n + 1
          except RemoveError:
              return n
docs: Removes every occurrence of ``elem`` from ``gset``.
  
      Returns the number of times ``elem`` was removed.