code: def get_provider_details(provider_id: str) -> ProviderPackageDetails:
      provider_info = get_provider_packages_metadata().get(provider_id)
      if not provider_info:
          raise RuntimeError(
              f"The provider {provider_id} has no provider.yaml defined."
          )
      plugins: list[PluginInfo] = []
      if "plugins" in provider_info:
          for plugin in provider_info["plugins"]:
              package_name, class_name = plugin["plugin-class"].rsplit(
                  ".", maxsplit=1
              )
              plugins.append(
                  PluginInfo(
                      name=plugin["name"],
                      package_name=package_name,
                      class_name=class_name,
                  )
              )
      return ProviderPackageDetails(
          provider_id=provider_id,
          source_date_epoch=provider_info["source-date-epoch"],
          full_package_name=f"airflow.providers.{provider_id}",
          pypi_package_name=f"apache-airflow-providers-{provider_id.replace('.', '-')}",
          source_provider_package_path=get_source_package_path(
              provider_id
          ),
          documentation_provider_package_path=get_documentation_package_path(
              provider_id
          ),
          changelog_path=get_source_package_path(provider_id)
          / "CHANGELOG.rst",
          provider_description=provider_info["description"],
          dependencies=provider_info["dependencies"],
          versions=provider_info["versions"],
          excluded_python_versions=provider_info.get(
              "excluded-python-versions"
          )
          or [],
          plugins=plugins,
          removed=provider_info["state"] == "removed",
      )
  
imports: from __future__ import annotations
  import fnmatch
  import json
  import os
  import subprocess
  import sys
  from enum import Enum
  from functools import lru_cache
  from pathlib import Path
  from typing import Any, Iterable, NamedTuple
  from airflow_breeze.global_constants import ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS, PROVIDER_DEPENDENCIES, PROVIDER_RUNTIME_DATA_SCHEMA_PATH, REGULAR_DOC_PACKAGES
  from airflow_breeze.utils.console import get_console
  from airflow_breeze.utils.path_utils import AIRFLOW_PROVIDERS_ROOT, BREEZE_SOURCES_ROOT, DOCS_ROOT, GENERATED_PROVIDER_PACKAGES_DIR, PROVIDER_DEPENDENCIES_JSON_FILE_PATH
  from airflow_breeze.utils.publish_docs_helpers import _load_schema, get_provider_yaml_paths
  from airflow_breeze.utils.run_utils import run_command
  from airflow_breeze.utils.versions import get_version_tag, strip_leading_zeros_from_version
label_desc: Use image node_id 25 for calling a global function with example usage: get_provider_details(provider_id) and returns: ProviderPackageDetails