code: def _default_threads(threads):
      if threads is None:
          if config.NUM_THREADS <= 0:
              return multiprocessing.cpu_count()
          return config.NUM_THREADS
      else:
          if threads > 1 and _threading_type is None:
              raise ValueError(
                  "threads > 1 requested, but pyFFTW was not built "
                  "with multithreaded FFTW."
              )
          elif threads <= 0:
              return multiprocessing.cpu_count()
          return threads
  
file_path: py-fftw/pyfftw/builders/_utils.py
imports: import multiprocessing
  import pyfftw
  import numpy
  import warnings
  from ..None import _threading_type
  from ..None import config
label_desc: Use image node_id 2 for calling a global function with example usage: _default_threads(threads) and returns: config, threads, multiprocessing, multiprocessing