code: def refresh_provider_metadata_from_yaml_file(
      provider_yaml_path: Path,
  ):
      import yaml
  
      schema = _load_schema()
      with open(provider_yaml_path) as yaml_file:
          provider = yaml.safe_load(yaml_file)
      try:
          import jsonschema
  
          try:
              jsonschema.validate(provider, schema=schema)
          except jsonschema.ValidationError:
              raise Exception(f"Unable to parse: {provider_yaml_path}.")
      except ImportError:
          # we only validate the schema if jsonschema is available. This is needed for autocomplete
          # to not fail with import error if jsonschema is not installed
          pass
      PROVIDER_METADATA[
          get_short_package_name(provider["package-name"])
      ] = provider
  
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 1 for calling a global function with example usage: refresh_provider_metadata_from_yaml_file(provider_yaml_path) without return types