def __getitem__(self, name):
    ' check contents dictionary to allow dict like access to service layers'
    if (name in list(self.__getattribute__('contents').keys())):
        return self.__getattribute__('contents')[name]
    else:
        raise KeyError(('No content named %s' % name))
check contents dictionary to allow dict like access to service layers
def __getitem__(self, name):
    ' '
    if (name in list(self.__getattribute__('contents').keys())):
        return self.__getattribute__('contents')[name]
    else:
        raise KeyError(('No content named %s' % name))