Check the shortcut function

def _shortcut_check(name,
                    target,
                    arguments,
                    working_dir,
                    description,
                    icon_location,
                    force,
                    user):
    '''
    Check the shortcut function
    '''
    changes = {}
    if not os.path.exists(name):
        changes['new'] = name
        return None, 'Shortcut "{0}" to "{1}" is set for creation'.format(
            name, target
        ), changes

    if os.path.isfile(name):
        with salt.utils.winapi.Com():
            shell = win32com.client.Dispatch("WScript.Shell")
        scut = shell.CreateShortcut(name)
        state_checks = [scut.TargetPath.lower() == target.lower()]
        if arguments is not None:
            state_checks.append(scut.Arguments == arguments)
        if working_dir is not None:
            state_checks.append(
                scut.WorkingDirectory.lower() == working_dir.lower()
            )
        if description is not None:
            state_checks.append(scut.Description == description)
        if icon_location is not None:
            state_checks.append(
                scut.IconLocation.lower() == icon_location.lower()
            )

        if not all(state_checks):
            changes['change'] = name
            return None, 'Shortcut "{0}" target is set to be changed to "{1}"'.format(
                name, target
            ), changes
        else:
            result = True
            msg = 'The shortcut "{0}" is present'.format(name)
            if not _check_shortcut_ownership(name, user):
                result = None
                changes['ownership'] = '{0}'.format(_get_shortcut_ownership(name))
                msg += (
                    ', but the ownership of the shortcut would be changed '
                    'from {1} to {0}'
                ).format(user, _get_shortcut_ownership(name))
            return result, msg, changes
    else:
        if force:
            return None, ('The link or directory "{0}" is set for removal to '
                          'make way for a new shortcut targeting "{1}"'
                          .format(name, target)), changes
        return False, ('Link or directory exists where the shortcut "{0}" '
                       'should be. Did you mean to use force?'.format(name)), changes