class_docstr: A simple LRU Cache implementation.
class_docstr_tok: ["A","simple","LRU","Cache","implementation","."]
docstr: Sets the value for an item. Moves the item up so that it
  has the highest priority then.
docstr_tok: ["Sets","the","value","for","an","item",".","Moves","the","item","up","so","that","it","has","the","highest","priority","then","."]
code: def __setitem__(self, key: t.Any, value: t.Any) -> None:
      """Sets the value for an item. Moves the item up so that it
      has the highest priority then.
      """
      with self._wlock:
          if key in self._mapping:
              self._remove(key)
          elif len(self._mapping) == self.capacity:
              del self._mapping[self._popleft()]
  
          self._append(key)
          self._mapping[key] = value
  
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 14 for calling the LRUCache obj's underlying member method code with example usage: obj.__setitem__(key, value) without return types