code: def lazy_property(function):
      
      cached_val = []
      def _wrapper(*args):
          try:
              return cached_val[0]
          except IndexError:
              ret_val = function(*args)
              cached_val.append(ret_val)
              return ret_val
      return _wrapper
docs: Cache the first return value of a function for all subsequent calls.
  
      This decorator is usefull for argument-less functions that behave more
      like a global or static property that should be calculated once, but
      lazily (i.e. only if requested).