code: def no_site_packages(request):
      import sys
  
      modules = {}
      for k in sys.modules:
          if request.param in k:
              modules[k] = sys.modules[k]
      for k in modules:
          del sys.modules[k]
  
      prev_path = list(sys.path)
      sys.path = [p for p in sys.path if "site-packages" not in p]
      yield "no_site_packages"
      sys.path = prev_path
      for k in modules:
          sys.modules[k] = modules[k]
  
imports: import random
  from pathlib import Path
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: no_site_packages(request) without return types