code: def forget(modname):
      """'Forget' a module was ever imported.
  
      This removes the module from sys.modules and deletes any PEP 3147/488 or
      legacy .pyc files.
      """
      unload(modname)
      for dirname in sys.path:
          source = os.path.join(dirname, modname + ".py")
          # It doesn't matter if they exist or not, unlink all possible
          # combinations of PEP 3147/488 and legacy pyc files.
          unlink(source + "c")
          for opt in ("", 1, 2):
              unlink(
                  importlib.util.cache_from_source(
                      source, optimization=opt
                  )
              )
  
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 3 for calling a global function with example usage: forget(modname) without return types