code: def weak_lru_cache(maxsize=100):
      """Weak least-recently-used cache decorator.
  
      If *maxsize* is set to None, the LRU features are disabled and the cache
      can grow without bound.
  
      Arguments to the cached function must be hashable. Any that are weak-
      referenceable will be stored by weak reference.  Once any of the args have
      been garbage collected, the entry will be removed from the cache.
  
      View the cache statistics named tuple (hits, misses, maxsize, currsize)
      with f.cache_info().  Clear the cache and statistics with f.cache_clear().
  
      See:  http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used
  
      """
  
      class desc(lazyval):
          def __get__(self, instance, owner):
              if instance is None:
                  return self
              try:
                  return self._cache[instance]
              except KeyError:
                  inst = ref(instance)
  
                  @_weak_lru_cache(maxsize)
                  @wraps(self._get)
                  def wrapper(*args, **kwargs):
                      return self._get(inst(), *args, **kwargs)
  
                  self._cache[instance] = wrapper
                  return wrapper
  
          @_weak_lru_cache(maxsize)
          def __call__(self, *args, **kwargs):
              return self._get(*args, **kwargs)
  
      return desc
  
imports: from collections import OrderedDict, Sequence
  from itertools import compress
  from weakref import WeakKeyDictionary, ref
  from six.moves._thread import allocate_lock
  from toolz.sandbox import unzip
  from trading_calendars.utils.memoize import lazyval
  from zipline.utils.compat import wraps
label_desc: Use image node_id 2 for calling a global function with example usage: weak_lru_cache(maxsize) and returns: desc, self, self, self, wrapper, self