code: def _find_importlib_plugins() -> Generator[Plugin, None, None]:
      # some misconfigured pythons (RHEL) have things on `sys.path` twice
      seen = set()
      for dist in importlib.metadata.distributions():
          # assigned to prevent continual reparsing
          eps = dist.entry_points
  
          # perf: skip parsing `.metadata` (slow) if no entry points match
          if not any(ep.group in FLAKE8_GROUPS for ep in eps):
              continue
  
          # assigned to prevent continual reparsing
          meta = dist.metadata
  
          if meta["name"] in seen:
              continue
          else:
              seen.add(meta["name"])
  
          if meta["name"] in BANNED_PLUGINS:
              LOG.warning(
                  "%s plugin is obsolete in flake8>=%s",
                  meta["name"],
                  BANNED_PLUGINS[meta["name"]],
              )
              continue
          elif meta["name"] == "flake8":
              # special case flake8 which provides plugins for pyflakes /
              # pycodestyle
              yield from _flake8_plugins(
                  eps, meta["name"], meta["version"]
              )
              continue
  
          for ep in eps:
              if ep.group in FLAKE8_GROUPS:
                  yield Plugin(meta["name"], meta["version"], ep)
  
imports: from __future__ import annotations
  import configparser
  import importlib.metadata
  import inspect
  import itertools
  import logging
  import sys
  from typing import Any
  from typing import Generator
  from typing import Iterable
  from typing import NamedTuple
  from flake8 import utils
  from flake8.defaults import VALID_CODE_PREFIX
  from flake8.exceptions import ExecutionError
  from flake8.exceptions import FailedToLoadPlugin
label_desc: Use image node_id 4 for calling a global function with example usage: _find_importlib_plugins() without return types