docstr: Validate that the destination is a valid container registry URI.
docstr_tok: ["Validate","that","the","destination","is","a","valid","container","registry","URI","."]
code: def validate_destination(cls, destination: str) -> str:
      """Validate that the destination is a valid container registry URI."""
      for regex in [
          GCP_ARTIFACT_REGISTRY_URI_REGEX,
          AZURE_CONTAINER_REGISTRY_URI_REGEX,
          ELASTIC_CONTAINER_REGISTRY_URI_REGEX,
      ]:
          if regex.match(destination):
              return destination
      raise ValueError(
          "Invalid destination. Destination must be a repository URI for an "
          "ECR, ACR, or GCP Artifact Registry."
      )
  
imports: from enum import Enum
  from typing import List, Optional
  from pydantic import BaseModel, Field, ValidationError, root_validator, validator
  import wandb
  from wandb.sdk.launch.utils import AZURE_BLOB_REGEX, AZURE_CONTAINER_REGISTRY_URI_REGEX, ELASTIC_CONTAINER_REGISTRY_URI_REGEX, GCP_ARTIFACT_REGISTRY_URI_REGEX, GCS_URI_RE, S3_URI_RE
label_desc: Use image node_id 1 for calling the BuilderConfig obj's underlying member method code with example usage: obj.validate_destination(cls, destination) and returns: destination