def absent(name, directory_id=None):
    # Because __opts__ is not available outside of functions
    if __opts__.get('requests_lib', False):
        from requests.exceptions import HTTPError
    else:
        from urllib2 import HTTPError

    ret = {'name': name,
           'changes': {},
           'result': None,
           'comment': ''}
    info = {}
    if directory_id is None:
        dirs = __salt__['stormpath.list_directories']()
        for dir_ in dirs.get('items', []):
            try:
                comps = dir_.get('href', '').split('/')
                directory_id = comps[-1]
                info = __salt__['stormpath.show_account'](email=name, directory_id=directory_id)
                if len(info.get('items', [])) > 0:
                    info = info['items'][0]
                    break
            except HTTPError:
                pass
    else:
        info = __salt__['stormpath.show_account'](email=name, directory_id=directory_id)
        info = info['items'][0]
    if 'items' in info:
        ret['result'] = True
        ret['comment'] = 'Stormpath account {0} already absent'.format(name)
        return ret
    if __opts__['test']:
        ret['comment'] = 'Stormpath account {0} needs to be deleted'.format(name)
        return ret
    comps = info['href'].split('/')
    account_id = comps[-1]
    if __salt__['stormpath.delete_account'](account_id):
        ret['changes'] = {'deleted': account_id}
        ret['result'] = True
        ret['comment'] = 'Stormpath account {0} was deleted'.format(name)
        return ret
    else:
        ret['result'] = False
        ret['comment'] = 'Failed to delete Stormpath account {0}'.format(name)
        return ret
Listens to the recent changes table.  Given no parameters, this function
dataset/ETHPy150Open saltstack/salt/salt/states/stormpath_account.py/absent--crossover with--dataset/ETHPy150Open mediawiki-utilities/python-mediawiki-utilities/mw/database/collections/recent_changes.py/RecentChanges.listen