code: def iter_plugins() -> Iterator[PluginInfo]:
      session = get_session()
      name_2_serial = pytest_plugin_projects_from_pypi(session)
  
      for name, last_serial in tqdm(name_2_serial.items(), smoothing=0):
          response = project_response_with_refresh(
              session, name, last_serial
          )
          if response.status_code == 404:
              # Some packages, like pytest-azurepipelines42, are included in https://pypi.org/simple
              # but return 404 on the JSON API. Skip.
              continue
          response.raise_for_status()
          info = response.json()["info"]
          if (
              "Development Status :: 7 - Inactive"
              in info["classifiers"]
          ):
              continue
          for classifier in DEVELOPMENT_STATUS_CLASSIFIERS:
              if classifier in info["classifiers"]:
                  status = classifier[22:]
                  break
          else:
              status = "N/A"
          requires = "N/A"
          if info["requires_dist"]:
              for requirement in info["requires_dist"]:
                  if re.match(r"pytest(?![-.\w])", requirement):
                      requires = requirement
                      break
  
          def version_sort_key(version_string: str) -> Any:
              """
              Return the sort key for the given version string
              returned by the API.
              """
              try:
                  return packaging.version.parse(version_string)
              except packaging.version.InvalidVersion:
                  # Use a hard-coded pre-release version.
                  return packaging.version.Version("0.0.0alpha")
  
          releases = response.json()["releases"]
          for release in sorted(
              releases, key=version_sort_key, reverse=True
          ):
              if releases[release]:
                  release_date = datetime.date.fromisoformat(
                      releases[release][-1][
                          "upload_time_iso_8601"
                      ].split("T")[0]
                  )
                  last_release = release_date.strftime("%b %d, %Y")
                  break
          name = f':pypi:`{info["name"]}`'
          summary = ""
          if info["summary"]:
              summary = escape_rst(info["summary"].replace("\n", ""))
          yield {
              "name": name,
              "summary": summary.strip(),
              "last_release": last_release,
              "status": status,
              "requires": requires,
          }
  
imports: import datetime
  import pathlib
  import re
  from textwrap import dedent
  from textwrap import indent
  from typing import Any
  from typing import Iterable
  from typing import Iterator
  from typing import TypedDict
  import packaging.version
  import platformdirs
  import tabulate
  import wcwidth
  from requests_cache import CachedResponse
  from requests_cache import CachedSession
  from requests_cache import OriginalResponse
  from requests_cache import SQLiteCache
  from tqdm import tqdm
label_desc: Use image node_id 5 for calling a global function with example usage: iter_plugins() and returns: packaging, packaging