code: def xvfb_it(my_test):
      """Run a test with xvfbwrapper."""
      # When we use verbose testing we want the name:
      fname = my_test.__name__
  
      def test_with_xvfb(*args, **kwargs):
          if use_xvfb:
              from xvfbwrapper import Xvfb
  
              display = Xvfb(width=1920, height=1080)
              display.start()
          my_test(*args, **kwargs)
          if use_xvfb:
              display.stop()
  
      # Plant it back in and return the new function:
      test_with_xvfb.__name__ = fname
      return test_with_xvfb if not is_windows else my_test
  
file_path: dipy/dipy/testing/decorators.py
imports: import re
  import os
  import platform
  import inspect
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: xvfb_it(my_test) and returns: unknown