code: def get_provider_version(provider_name):
      """
      Returns provider version given provider package name.
  
      Example::
          if provider_version("apache-airflow-providers-cncf-kubernetes") >= (6, 0):
              raise Exception(
                  "You must now remove `get_kube_client` from PodManager "
                  "and make kube_client a required argument."
              )
      """
      from airflow.providers_manager import ProvidersManager
  
      info = ProvidersManager().providers[provider_name]
      return semver.VersionInfo.parse(info.version)
  
imports: from __future__ import annotations
  import semver
label_desc: Use image node_id 2 for calling a global function with example usage: get_provider_version(provider_name) and returns: semver