code: def _general_multithread(func):
      
  
      def multithread(templates, stream, *args, **kwargs):
          with pool_boy(ThreadPool, len(stream), **kwargs) as pool:
              return _pool_normxcorr(templates, stream, pool=pool, func=func)
  
      return multithread
docs: return the general multithreading function using func