

def has_sound(sound):
    'Find out if a particular event is configured with a default sound'
    try:
        if (ctypes.windll.winmm.mixerGetNumDevs() == 0):
            return False
        key = winreg.OpenKeyEx(winreg.HKEY_CURRENT_USER, 'AppEvents\\Schemes\\Apps\\.Default\\{0}\\.Default'.format(sound))
        return (winreg.EnumValue(sound, 0)[1] != '')
    except WindowsError:
        return False

dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_winsound.py has_sound/VarMisuse@61/121 `key`->`sound`