code: def test_display_config(monkeypatch, dispnum):
      """Check that the display_variable option is used ($DISPLAY not set)"""
      config._display = None
      dispstr = ":%d" % dispnum
      config.set("execution", "display_variable", dispstr)
      monkeypatch.delitem(os.environ, "DISPLAY", raising=False)
      assert config.get_display() == config.get(
          "execution", "display_variable"
      )
      # Test that it was correctly cached
      assert config.get_display() == config.get(
          "execution", "display_variable"
      )
  
file_path: nipype/nipype/utils/tests/test_config.py
imports: import os
  import sys
  import pytest
  from nipype import config
  from unittest.mock import MagicMock
label_desc: Use image node_id 2 for calling a global function with example usage: test_display_config(monkeypatch, dispnum) without return types