docs: def iter_module_paths(modules=None):
      """ Yield paths of all imported modules."""
      modules = modules or list(sys.modules.values())
      for module in modules:
          try:
              filename = module.__file__
          except (AttributeError, ImportError):  # pragma: no cover
              continue
          if filename is not None:
              abs_filename = os.path.abspath(filename)
              if os.path.isfile(abs_filename):
                  yield abs_filename