class_docstr: Decorator for LRU-cached function
  
  timeout parameter specifies after how many seconds a cached entry should
  be considered invalid.
class_docstr_tok: ["Decorator","for","LRU-cached","function","timeout","parameter","specifies","after","how","many","seconds","a","cached","entry","should","be","considered","invalid","."]
code: def __init__(
      self,
      maxsize,
      cache=None,  # cache is an arg to serve tests
      timeout=None,
      ignore_unhashable_args=False,
      real_func=None,
      remove_self=False,
  ):
      if cache is None:
          if maxsize is None:
              cache = UnboundedCache()
          elif timeout is None:
              cache = LRUCache(maxsize)
          else:
              cache = ExpiringLRUCache(maxsize, default_timeout=timeout)
      self.real_func = real_func
      self.remove_self = remove_self
      self.cache = cache
      self._ignore_unhashable_args = ignore_unhashable_args
  
imports: from abc import abstractmethod
  from abc import ABCMeta
  import threading
  import time
  import uuid
  import inspect
label_desc: Use image node_id 1 to create a new lru_cache object from inherited base classes: object with example: obj = lru_cache(maxsize, cache, timeout, ignore_unhashable_args, real_func, remove_)