Ensure an object is not inheriting ACLs from its parent

def disinherit(name, objectType, copy_inherited_acl=True):
    '''
    Ensure an object is not inheriting ACLs from its parent
    '''
    ret = {'name': name,
           'result': True,
           'changes': {},
           'comment': ''}
    tRet = __salt__['win_dacl.check_inheritance'](name, objectType)
    if tRet['result']:
        if tRet['Inheritance']:
            if __opts__['test']:
                ret['result'] = None
                ret['changes']['Inheritance'] = "Disabled"
                ret['comment'] = 'Inheritance is set to be disabled.'
                ret['changes']['Inherited ACLs'] = (
                        'Are set to be kept' if copy_inherited_acl else 'Are set to be removed')
                return ret
            eRet = __salt__['win_dacl.disable_inheritance'](name, objectType, copy_inherited_acl)
            ret['result'] = eRet['result']
            if eRet['result']:
                ret['changes'] = dict(ret['changes'], **eRet['changes'])
            else:
                ret['comment'] = ' '.join([ret['comment'], eRet['comment']])
        else:
            if __opts__['test']:
                ret['result'] = None
                ret['comment'] = 'Inheritance is disabled.'
    else:
        ret['result'] = False
        ret['comment'] = tRet['comment']
    return ret