code: def cached_property(getter):
      """
      Decorator that converts a method into memoized property.
      The decorator works as expected only for classes with
      attribute '__dict__' and immutable properties.
      """
  
      @wraps(getter)
      def decorator(self):
          key = "_cached_property_" + getter.__name__
  
          if not hasattr(self, key):
              setattr(self, key, getter(self))
  
          return getattr(self, key)
  
      return property(decorator)
  
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  import sys
  import requests
  import pkgutil
  from functools import wraps
  from contextlib import closing
  from os.path import dirname, abspath, join
  from ._compat import to_string, to_unicode, string_types
  from pycountry import languages
label_desc: Use image node_id 3 for calling a global function with example usage: cached_property(getter) and returns: property, getattr