<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def launch_modules_with_names(modules_with_names, module_args={}, kill_before_launch=True):
    '''launch module.main functions in another process'''
    processes = []
    if kill_before_launch:
        for module_name, name in modules_with_names:
            kill_module(name)
    for module_name, name in modules_with_names:
        m = importlib.import_module(module_name)
        args = {}
        if module_name in module_args:
            args = module_args[module_name]
        p1 = Process(target=m.main, args=args)
        p1.daemon = True
        p1.start()
        processes.append(p1)
        with open(get_launched_module_pid_file(name), 'w') as f:
            f.write('{}'.format(p1.pid))
    return processes