class_docstr: A simple LRU Cache implementation.
class_docstr_tok: ["A","simple","LRU","Cache","implementation","."]
docstr: Get an item from the cache. Moves the item up so that it has the
  highest priority then.
  
  Raise a `KeyError` if it does not exist.
docstr_tok: ["Get","an","item","from","the","cache",".","Moves","the","item","up","so","that","it","has","the","highest","priority","then",".","Raise","a","`","KeyError","`","if","it","does","not","exist","."]
code: def __getitem__(self, key: t.Any) -> t.Any:
      """Get an item from the cache. Moves the item up so that it has the
      highest priority then.
  
      Raise a `KeyError` if it does not exist.
      """
      with self._wlock:
          rv = self._mapping[key]
  
          if self._queue[-1] != key:
              try:
                  self._remove(key)
              except ValueError:
                  # if something removed the key from the container
                  # when we read, ignore the ValueError that we would
                  # get otherwise.
                  pass
  
              self._append(key)
  
          return rv
  
imports: import enum
  import json
  import os
  import re
  import typing
  from collections import abc
  from collections import deque
  from random import choice
  from random import randrange
  from threading import Lock
  from types import CodeType
  from urllib.parse import quote_from_bytes
  import markupsafe
label_desc: Use image node_id 13 for calling the LRUCache obj's underlying member method code with example usage: obj.__getitem__(key) and returns: rv