code: def lazy_property(fn):
      attr_name = "_lazy_" + fn.__name__
  
      lock = threading.Lock()
  
      @property
      def _lazy_property(self):
          if hasattr(self, attr_name):
              return getattr(self, attr_name)
  
          with lock:
              if not hasattr(self, attr_name):
                  setattr(self, attr_name, fn(self))
              return getattr(self, attr_name)
  
      return _lazy_property
  
imports: import functools
  import threading
  import collections
  import contextlib
  import six
label_desc: Use image node_id 4 for calling a global function with example usage: lazy_property(fn) and returns: _lazy_property, getattr, getattr