code: def test_set_global_output_type():
      """Ensure that set_global_output_type is thread-safe"""
  
      def check_correct_type(index):
          output_type = test_output_types_str[index]
          # Force a race condition
          if index == 0:
              sleep(0.1)
          set_global_output_type(output_type)
          sleep(0.5)
          return cuml.global_settings.output_type == output_type
  
      results = [
          delayed(check_correct_type)(index)
          for index in range(len(test_output_types_str))
      ]
  
      assert (delayed(all)(results)).compute()
  
file_path: cuml/python/cuml/tests/dask/test_dask_global_settings.py
imports: from time import sleep
  import pytest
  from dask import delayed
  import cuml
  from cuml import set_global_output_type, using_output_type
  from cuml.internals.api_context_managers import _using_mirror_output_type
  from cuml.internals.global_settings import _global_settings_data, _GlobalSettingsData, GlobalSettings
label_desc: Use image node_id 1 for calling a global function with example usage: test_set_global_output_type() and returns: unknown