code: def memoized(fget):
      
      attr_name = '_{0}'.format(fget.__name__)
  
      @wraps(fget)
      def fget_memoized(self):
          if not hasattr(self, attr_name):
              setattr(self, attr_name, fget(self))
          return getattr(self, attr_name)
  
      return property(fget_memoized)
docs: Return a property attribute for new-style classes that only calls its
      getter on the first access. The result is stored and on subsequent
      accesses is returned, preventing the need to call the getter any more.
  
      Parameters
      ----------
      fget: function
          The getter method to memoize for subsequent access.
  
      See also
      --------
      python-memoized-property
          `python-memoized-property <https://github.com/estebistec/python-memoized-property>`_