code: def test_name():
      name_list = []
      name_manager = mx.name.current()
      name_manager.get(None, "main_thread")
      name_list.append(name_manager)
  
      def f():
          with mx.name.NameManager():
              name_manager = mx.name.current()
              name_manager.get(None, "spawned_thread")
              name_list.append(name_manager)
  
      thread = threading.Thread(target=f)
      thread.start()
      thread.join()
      assert (
          "main_thread" in name_list[0]._counter
      ), "cannot find the string `main thread` in name_list[0]._counter"
      assert (
          "spawned_thread" in name_list[1]._counter
      ), "cannot find the string `spawned thread` in name_list[1]._counter"
  
      e1 = threading.Event()
      e2 = threading.Event()
      status = [False]
  
      def g():
          with mx.name.NameManager():
              e2.set()
              e1.wait()
              if "main_thread" not in mx.name.current()._counter:
                  status[0] = True
  
      thread = threading.Thread(target=g)
      thread.start()
      e2.wait()
      with mx.name.NameManager():
          mx.name.current().get(None, "main_thread")
          e1.set()
          thread.join()
      e1.clear()
      e2.clear()
      assert status[
          0
      ], "Spawned thread isn't using thread local NameManager"
  
file_path: mxnet/tests/python/unittest/test_thread_local.py
imports: import threading
  import numpy
  import mxnet
  from mxnet import device, attribute
  from mxnet.device import Device
  from mxnet.attribute import AttrScope
  from mxnet.test_utils import assert_almost_equal, set_default_device
  from mxnet.util import _NumpyArrayScope, set_np_shape
label_desc: Use image node_id 3 for calling a global function with example usage: test_name() without return types