'Creates a new property on the resource to lazy-load its value
via the resource\'s ``load`` method (if it exists).'

def _create_autoload_property(factory_self, resource_name, name, snake_cased, member_model, service_context):

    def property_loader(self):
        if (self.meta.data is None):
            if hasattr(self, 'load'):
                self.load()
            else:
                raise ResourceLoadException('{0}    has    no    load    method'.format(self.__class__.__name__))
        return self.meta.data.get(name)
    property_loader.__name__ = str(snake_cased)
    property_loader.__doc__ = docstring.AttributeDocstring(service_name=service_context.service_name, resource_name=resource_name, attr_name=snake_cased, event_emitter=factory_self._emitter, attr_model=member_model, include_signature=False)
    return property(property_loader)
