code: def _save_and_remove_modules(names):
      orig_modules = {}
      prefixes = tuple(name + "." for name in names)
      for modname in list(sys.modules):
          if modname in names or modname.startswith(prefixes):
              orig_modules[modname] = sys.modules.pop(modname)
      return orig_modules
  
imports: import contextlib
  import _imp
  import importlib
  import importlib.util
  import os
  import shutil
  import sys
  import unittest
  import warnings
  from .os_helper import unlink, temp_dir
label_desc: Use image node_id 6 for calling a global function with example usage: _save_and_remove_modules(names) and returns: orig_modules