code: def test_engine_openmp_after_fork():
      """
      Test that the number of max threads in the child is 1. After forking we should not use a bigger
      OMP thread pool.
  
      With GOMP the child always has the same number when calling omp_get_max_threads, with LLVM OMP
      the child respects the number of max threads set in the parent.
      """
      with environment("OMP_NUM_THREADS", "42"):
          r, w = os.pipe()
          pid = os.fork()
          if pid:
              os.close(r)
              wfd = os.fdopen(w, "w")
              wfd.write("a")
              omp_max_threads = mx.base._LIB.omp_get_max_threads()
              print(
                  "Parent omp max threads: {}".format(omp_max_threads)
              )
              try:
                  wfd.close()
              except:
                  pass
              try:
                  (cpid, status) = os.waitpid(pid, 0)
                  assert cpid == pid
                  exit_status = status >> 8
                  assert exit_status == 0
              except:
                  pass
          else:
              os.close(w)
              rfd = os.fdopen(r, "r")
              rfd.read(1)
              omp_max_threads = mx.base._LIB.omp_get_max_threads()
              print("Child omp max threads: {}".format(omp_max_threads))
              assert omp_max_threads == 1
  
imports: import mxnet
  import os
  from mxnet.test_utils import environment
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_engine_openmp_after_fork() without return types