def __getattribute__(self, name):
if name in type(self).properties.keys():<EOL><INDENT>if type(self).properties[name].identifier:<EOL><INDENT>pass <EOL><DEDENT>elif (object.__getattribute__(self, name) is None and not self._populatedor type(self).properties[name].derived_class)or (type(self).properties[name].volatileand object.__getattribute__(self, '<STR_LIT>')<EOL>+ volatile_refresh_timeout < datetime.now()):<EOL><INDENT>if type(self).properties[name].derived_class:<EOL><INDENT>self._set(name, type(self).properties[name].derived_class<EOL>._api_get_derived(self, getattr(self, '<STR_LIT>')))<EOL><DEDENT>else:<EOL><INDENT>self._api_get()<EOL><DEDENT><DEDENT><DEDENT>elif "<STR_LIT>".format(name) in type(self).properties.keys():<EOL><INDENT>related_type = type(self).properties['<STR_LIT>'.format(name)].id_relationship<EOL>if related_type:<EOL><INDENT>if not getattr(self, "<STR_LIT>".format(name)):<EOL><INDENT>return None<EOL><DEDENT>relcache_name = '<STR_LIT>'.format(name)<EOL>if not hasattr(self, relcache_name):<EOL><INDENT>self._set(relcache_name, related_type(self._client, getattr(self, '<STR_LIT>'.format(name))))<EOL><DEDENT>return object.__getattribute__(self, relcache_name)<EOL><DEDENT><DEDENT>return object.__getattribute__(self, name)<EOL>
Handles lazy-loading/refreshing an object from the server, and
getting related objects, as defined in this object's 'properties'