class_docstr: Configuration for registry block.
  
  Note that we don't forbid extra fields here because:
  - We want to allow all fields supported by each registry
  - We will perform validation on the registry object itself later
  - Registry block is being deprecated in favor of destination field in builder
class_docstr_tok: ["Configuration","for","registry","block",".","Note","that","we","do","n't","forbid","extra","fields","here","because",":","-","We","want","to","allow","all","fields","supported","by","each","registry","-","We","will","perform","validation","on","the","registry","object","itself","later","-","Registry","block","is","being","deprecated","in","favor","of","destination","field","in","builder"]
code: def validate_uri(cls, uri: str) -> str:
      for regex in [
          GCP_ARTIFACT_REGISTRY_URI_REGEX,
          AZURE_CONTAINER_REGISTRY_URI_REGEX,
          ELASTIC_CONTAINER_REGISTRY_URI_REGEX,
      ]:
          if regex.match(uri):
              return uri
      raise ValueError(
          "Invalid uri. URI 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 RegistryConfig obj's underlying member method code with example usage: obj.validate_uri(cls, uri) and returns: uri