def lazy_loading_proxy_for_interface(interface, loader):
 class LazyLoadingProxy(proxyForInterface(interface, '_original'), ):
  _cached_original = None
  def __init__(self):
   '\n            The initializer of a class generated by ``proxyForInterface``\n            expects the wrapped "original" object as an argument.  Overrride\n            that here.\n            '
  @property
  def _original(self):
   if (self._cached_original is None):
    self._cached_original = loader()
   return self._cached_original
 return LazyLoadingProxy()

def lazy_loading_proxy_for_interface ( interface , loader ) : class LazyLoadingProxy ( proxyForInterface ( interface , '_original' ) , ) : _cached_original = None def __init__ ( self ) : @ property def _original ( self ) : if ( self . _cached_original is None ) : self . _cached_original = loader ( ) return self . _cached_original return LazyLoadingProxy ( )
create a proxy for an interface which builds the wrapped object lazily .