code: def _lazy_headless():
      import os
      import sys
  
      backend, deps = sys.argv[1:]
      deps = deps.split(",")
  
      # make it look headless
      os.environ.pop("DISPLAY", None)
      os.environ.pop("WAYLAND_DISPLAY", None)
      for dep in deps:
          assert dep not in sys.modules
  
      # we should fast-track to Agg
      import matplotlib.pyplot as plt
  
      assert plt.get_backend() == "agg"
      for dep in deps:
          assert dep not in sys.modules
  
      # make sure we really have dependencies installed
      for dep in deps:
          importlib.import_module(dep)
          assert dep in sys.modules
  
      # try to switch and make sure we fail with ImportError
      try:
          plt.switch_backend(backend)
      except ImportError:
          pass
      else:
          sys.exit(1)
  
imports: import functools
  import importlib
  import importlib.util
  import inspect
  import json
  import os
  import platform
  import signal
  import subprocess
  import sys
  import tempfile
  import time
  import urllib.request
  from PIL import Image
  import pytest
  import matplotlib
  from matplotlib import _c_internal_utils
  from matplotlib.backend_tools import ToolToggleBase
  from matplotlib.testing import subprocess_run_helper
label_desc: Use image node_id 20 for calling a global function with example usage: _lazy_headless() without return types