class_docstr: Thread-safe implementation of an ordered set queue.
  
  Disallows adding a duplicate item while maintaining the
  order of items in the queue. The implementation leverages
  locking already implemented in the base class
  redefining only the primitives. Since the internal queue
  is not replaced, the order is maintained. The set is used
  merely to check for the existence of an item.
  
  Queued items must be immutable and hashable so that they can be used
  as dictionary keys. You must implement **only read-only properties** and
  the :meth:`Item.__hash__()`, :meth:`Item.__eq__()`, and
  :meth:`Item.__ne__()` methods for items to be hashable.
  
  An example implementation follows::
  
      class Item(object):
          def __init__(self, a, b):
              self._a = a
              self._b = b
  
          @property
          def a(self):
              return self._a
  
          @property
          def b(self):
              return self._b
  
          def _key(self):
              return (self._a, self._b)
  
          def __eq__(self, item):
              return self._key() == item._key()
  
          def __ne__(self, item):
              return self._key() != item._key()
  
          def __hash__(self):
              return hash(self._key())
  
  :author: lalinsky@gmail.com (Lukáš Lalinský)
  :url: http://stackoverflow.com/questions/1581895/how-check-if-a-task-is-already-in-python-queue
class_docstr_tok: ["Thread-safe","implementation","of","an","ordered","set","queue",".","Disallows","adding","a","duplicate","item","while","maintaining","the","order","of","items","in","the","queue",".","The","implementation","leverages","locking","already","implemented","in","the","base","class","redefining","only","the","primitives",".","Since","the","internal","queue","is","not","replaced",",","the","order","is","maintained",".","The","set","is","used","merely","to","check","for","the","existence","of","an","item",".","Queued","items","must","be","immutable","and","hashable","so","that","they","can","be","used","as","dictionary","keys",".","You","must","implement","*","*","only","read-only","properties","*","*","and","the",":","meth",":","`","Item.__hash__","(",")","`",",",":","meth",":","`","Item.__eq__","(",")","`",",","and",":","meth",":","`","Item.__ne__","(",")","`","methods","for","items","to","be","hashable",".","An","example","implementation","follows",":",":","class","Item","(","object",")",":","def","__init__","(","self",",","a",",","b",")",":","self._a","=","a","self._b","=","b","@","property","def","a","(","self",")",":","return","self._a","@","property","def","b","(","self",")",":","return","self._b","def","_key","(","self",")",":","return","(","self._a",",","self._b",")","def","__eq__","(","self",",","item",")",":","return","self._key","(",")","==","item._key","(",")","def","__ne__","(","self",",","item",")",":","return","self._key","(",")","!","=","item._key","(",")","def","__hash__","(","self",")",":","return","hash","(","self._key","(",")",")",":","author",":","lalinsky","@","gmail.com","(","Luk\u00e1\u0161","Lalinsk\u00fd",")",":","url",":","http",":","\/\/stackoverflow.com\/questions\/1581895\/how-check-if-a-task-is-already-in-python-queue"]
code: def _get(self):
      item = queue.Queue._get(self)
      self._set_of_items.remove(item)
      return item
  
file_path: wandb/wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/bricks.py
imports: import sys
  from collections.abc import MutableSet
  from .compat import queue
label_desc: Use image node_id 3 for calling the OrderedSetQueue obj's underlying member method code with example usage: obj._get() and returns: item