docstr: Remove and return an item from the queue.
  
  If optional args `block` is True and `timeout` is None (the
  default), block if necessary until an item is available. If
  `timeout` is a positive number, it blocks at most `timeout`
  seconds and raises the ``Empty`` exception if no item was
  available within that time.  Otherwise (`block` is false),
  return an item if one is immediately available, else raise the
  ``Empty`` exception (`timeout` is ignored in that case).
docstr_tok: ["Remove","and","return","an","item","from","the","queue",".","If","optional","args","`","block","`","is","True","and","`","timeout","`","is","None","(","the","default",")",",","block","if","necessary","until","an","item","is","available",".","If","`","timeout","`","is","a","positive","number",",","it","blocks","at","most","`","timeout","`","seconds","and","raises","the","``","Empty","``","exception","if","no","item","was","available","within","that","time",".","Otherwise","(","`","block","`","is","false",")",",","return","an","item","if","one","is","immediately","available",",","else","raise","the","``","Empty","``","exception","(","`","timeout","`","is","ignored","in","that","case",")","."]
code: def get(
      self, block: bool = True, timeout: Optional[float] = None
  ) -> _T:
      """Remove and return an item from the queue.
  
      If optional args `block` is True and `timeout` is None (the
      default), block if necessary until an item is available. If
      `timeout` is a positive number, it blocks at most `timeout`
      seconds and raises the ``Empty`` exception if no item was
      available within that time.  Otherwise (`block` is false),
      return an item if one is immediately available, else raise the
      ``Empty`` exception (`timeout` is ignored in that case).
  
      """
      with self.not_empty:
          if not block:
              if self._empty():
                  raise Empty
          elif timeout is None:
              while self._empty():
                  self.not_empty.wait()
          else:
              if timeout < 0:
                  raise ValueError(
                      "'timeout' must be a positive number"
                  )
              endtime = _time() + timeout
              while self._empty():
                  remaining = endtime - _time()
                  if remaining <= 0.0:
                      raise Empty
                  self.not_empty.wait(remaining)
          item = self._get()
          self.not_full.notify()
          return item
  
imports: from __future__ import annotations
  import asyncio
  from collections import deque
  import threading
  from time import time
  from typing import Any
  from typing import Deque
  from typing import Generic
  from typing import Optional
  from typing import TypeVar
  from .concurrency import await_
  from .langhelpers import memoized_property
label_desc: Use image node_id 7 for calling the Queue obj's underlying member method code with example usage: obj.get(block, timeout) and returns: item