import threading
from concurrent.futures import ThreadPoolExecutor
from service.train import do_train


def thread_runner(thread_num, func, *args):
    executor = ThreadPoolExecutor(thread_num)
    f = executor.submit(do_train, *args)

[((7, 15, 7, 45), 'concurrent.futures.ThreadPoolExecutor', 'ThreadPoolExecutor', ({(7, 34, 7, 44): 'thread_num'}, {}), '(thread_num)', False, 'from concurrent.futures import ThreadPoolExecutor\n')]