code: def setUp(self):
      from cellprofiler_core.preferences import (
          set_headless,
          set_temporary_directory,
      )
  
      set_headless()
      set_temporary_directory(tempfile.gettempdir())
      self.old_import = builtins.__import__
      builtins.__import__ = import_all_but_wx
  
file_path: CellProfiler/tests/frontend/test_nowx.py
imports: import builtins
  import sys
  import tempfile
  import unittest
  from urllib.request import urlopen
  from tests.frontend.modules import example_images_directory, get_test_resources_directory
label_desc: Use image node_id 1 for calling the TestNoWX obj's underlying member method code with example usage: obj.setUp() without return types