code: def test_thread_level():
      import sys
  
      flag = MPI.Query_thread() == MPI.THREAD_MULTIPLE
      flag = MPI.COMM_WORLD.bcast(flag, root=0)
      if not flag:
          if MPI.COMM_WORLD.Get_rank() == 0:
              sys.stderr.write(
                  "MPI does not provide enough thread support\n"
              )
          sys.exit(0)
  
file_path: mpi4py/demo/nxtval/nxtval-threads.py
imports: from mpi4py import MPI
  from array import array
  from threading import Thread
label_desc: Use image node_id 1 for calling a global function with example usage: test_thread_level() without return types