TODO
    :param executables:
    :return:

def _generate_event_listener_caller(executables: List[str]) -> LockEventListener:
    """
    TODO
    :param executables:
    :return:
    """
    def event_listener_caller(key: str):
        for executable in executables:
            try:
                process = subprocess.Popen([executable, key], stderr=subprocess.PIPE, stdout=subprocess.PIPE)
                output, stderr = process.communicate()
                if len(stderr) > 0:
                    logger.info(f"stderr from executing \"{executable}\": {stderr.decode('utf-8').strip()}")
                if process.returncode != 0:
                    logger.error(f"Error when executing \"{executable}\": return code was {process.returncode}")
                # Not falling over if event listener does!
            except OSError as e:
                common_error_string = f"Could not execute \"{executable}\":"
                if e.errno == errno.ENOEXEC:
                    logger.warning(f"{common_error_string} {e} (perhaps the executable needs a shebang?)")
                else:
                    logger.warning(f"{common_error_string} {e}")

    return event_listener_caller