code: def test_multithread_exec_multiprocessing_disable():
      with patch.object(ThreadPool, "map") as mock_tp_map:
          multithread_exec(lambda x: x, [1, 2])
      assert not mock_tp_map.called
  
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 2 for calling a global function with example usage: test_multithread_exec_multiprocessing_disable() without return types