def METHOD_NAME(dkeys, state):
    if dkeys:
        try:
            for dkey in dkeys:
                wr.SetValueEx(dkey,
                              r'PromptForFileName',
                              0,
                              wr.REG_SZ,
                              '1' if state else '0')
            return state
        except Exception as key_read_err:
            logger.debug('Error accessing registry key value.'
                         ' | {}'.format(key_read_err))
    else:
        logger.debug('No registry keys are available for revu printer driver.')