class_docstr: Google Kubernetes Engine cluster APIs.
  
  All the methods in the hook where project_id is used must be called with
  keyword arguments rather than positional.
class_docstr_tok: ["Google","Kubernetes","Engine","cluster","APIs",".","All","the","methods","in","the","hook","where","project_id","is","used","must","be","called","with","keyword","arguments","rather","than","positional","."]
docstr: Append labels to provided Cluster Protobuf.
  
  Labels must fit the regex ``[a-z]([-a-z0-9]*[a-z0-9])?`` (current
   airflow version string follows semantic versioning spec: x.y.z).
  
  :param cluster_proto: The proto to append resource_label airflow
      version to
  :param key: The key label
  :param val:
  :return: The cluster proto updated with new label
docstr_tok: ["Append","labels","to","provided","Cluster","Protobuf",".","Labels","must","fit","the","regex","``","[","a-z","]","(","[","-a-z0-9","]","*","[","a-z0-9","]",")","?","``","(","current","airflow","version","string","follows","semantic","versioning","spec",":","x.y.z",")",".",":","param","cluster_proto",":","The","proto","to","append","resource_label","airflow","version","to",":","param","key",":","The","key","label",":","param","val",":",":","return",":","The","cluster","proto","updated","with","new","label"]
code: def _append_label(
      cluster_proto: Cluster, key: str, val: str
  ) -> Cluster:
      """Append labels to provided Cluster Protobuf.
  
      Labels must fit the regex ``[a-z]([-a-z0-9]*[a-z0-9])?`` (current
       airflow version string follows semantic versioning spec: x.y.z).
  
      :param cluster_proto: The proto to append resource_label airflow
          version to
      :param key: The key label
      :param val:
      :return: The cluster proto updated with new label
      """
      val = val.replace(".", "-").replace("+", "-")
      cluster_proto.resource_labels.update({key: val})
      return cluster_proto
  
imports: from __future__ import annotations
  import contextlib
  import json
  import time
  import warnings
  from functools import cached_property
  from typing import TYPE_CHECKING, Sequence
  from gcloud.aio.auth import Token
  from google.api_core.exceptions import NotFound
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
  from google.auth.transport import requests
  from google.cloud import container_v1, exceptions
  from google.cloud.container_v1 import ClusterManagerAsyncClient, ClusterManagerClient
  from google.cloud.container_v1.types import Cluster, Operation
  from kubernetes import client
  from kubernetes_asyncio import client
  from kubernetes_asyncio.config.kube_config import FileOrData
  from urllib3.exceptions import HTTPError
  from airflow import version
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.cncf.kubernetes.utils.pod_manager import PodOperatorHookProtocol
  from airflow.providers.google.common.consts import CLIENT_INFO
  from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook
label_desc: Use image node_id 7 for calling the GKEHook obj's underlying member method code with example usage: obj._append_label(cluster_proto, key, val) and returns: cluster_proto