class_docstr: A finder for mocking.
class_docstr_tok: ["A","finder","for","mocking","."]
docstr: Invalidate mocked modules on sys.modules.
docstr_tok: ["Invalidate","mocked","modules","on","sys.modules","."]
code: def invalidate_caches(self) -> None:
      """Invalidate mocked modules on sys.modules."""
      for modname in self.mocked_modules:
          sys.modules.pop(modname, None)
  
imports: from __future__ import annotations
  import contextlib
  import os
  import sys
  from importlib.abc import Loader, MetaPathFinder
  from importlib.machinery import ModuleSpec
  from types import MethodType, ModuleType
  from typing import TYPE_CHECKING, Any
  from sphinx.util import logging
  from sphinx.util.inspect import isboundmethod, safe_getattr
label_desc: Use image node_id 3 for calling the MockFinder obj's underlying member method code with example usage: obj.invalidate_caches() without return types