code: def test_multithread_exec(input_seq, func, output_seq):
      assert list(multithread_exec(func, input_seq)) == output_seq
      assert list(multithread_exec(func, input_seq, 0)) == output_seq
  
imports: import os
  from multiprocessing.pool import ThreadPool
  from unittest.mock import patch
  import pytest
  from doctr.utils.multithreading import multithread_exec
label_desc: Use image node_id 1 for calling a global function with example usage: test_multithread_exec(input_seq, func, output_seq) without return types