def run_in_separate_process(func, *args, **kwargs):
manager = multiprocessing.Manager()<EOL>manager_dict = manager.dict()<EOL>process = ProcessWithException(<EOL>manager_dict, target=func, args=args, kwargs=kwargs)<EOL>process.start()<EOL>process.join()<EOL>exc = process.exception<EOL>if exc:<EOL><INDENT>raise exc<EOL><DEDENT>return process.output<EOL>
Runs function in separate process.

    This function is used instead of a decorator, since Python multiprocessing
    module can't serialize decorated function on all platforms.