<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def popenCLIExecutable(command, **kwargs):
 """Wrapper around subprocess.Popen constructor that tries to detect Slicer CLI modules and launches them through the Slicer launcher in order to prevent potential DLL dependency issues. Any kwargs are passed on to subprocess.Popen(). If you ever try to use this function to run a CLI, you might want to take a look at https://github.com/hmeine/MeVisLab-CLI/blob/master/Modules/Macros/CTK_CLI/CLIModuleBackend.py (in particular, the CLIExecution class.) Ideally, more of that code would be extracted and moved here, but I have not gotten around to doing that yet. """


    cliExecutable = command[0]

    # hack (at least, this does not scale to other module sources):
    # detect Slicer modules and run through wrapper script setting up
    # appropriate runtime environment
    ma = re_slicerSubPath.search(cliExecutable)
    if ma:
        wrapper = os.path.join(cliExecutable[:ma.start()], 'Slicer')
        if sys.platform.startswith('win'):
            wrapper += '.exe'
        if os.path.exists(wrapper):
            command = [wrapper, '--launcher-no-splash', '--launch'] + command

    return subprocess.Popen(command, **kwargs)