class_docstr: Google Artifact Registry helper for interacting with the registry.
  
  This helper should be constructed from either a uri or a repository,
  project, and optional image-name. If constructed from a uri, the uri
  must be of the form REGION-docker.pkg.dev/PROJECT/REPOSITORY/[IMAGE_NAME],
  with an optional https:// preceding.
class_docstr_tok: ["Google","Artifact","Registry","helper","for","interacting","with","the","registry",".","This","helper","should","be","constructed","from","either","a","uri","or","a","repository",",","project",",","and","optional","image-name",".","If","constructed","from","a","uri",",","the","uri","must","be","of","the","form","REGION-docker.pkg.dev\/PROJECT\/REPOSITORY\/","[","IMAGE_NAME","]",",","with","an","optional","https",":","\/\/","preceding","."]
docstr: Create a Google Artifact Registry from a config.
  
  Arguments:
      config: A dictionary containing the following keys:
          repository: The repository name.
          image-name: The image name.
      environment: A GcpEnvironment configured for access to this registry.
  
  Returns:
      A GoogleArtifactRegistry.
docstr_tok: ["Create","a","Google","Artifact","Registry","from","a","config",".","Arguments",":","config",":","A","dictionary","containing","the","following","keys",":","repository",":","The","repository","name",".","image-name",":","The","image","name",".","environment",":","A","GcpEnvironment","configured","for","access","to","this","registry",".","Returns",":","A","GoogleArtifactRegistry","."]
code: def from_config(
      cls,
      config: dict,
  ) -> "GoogleArtifactRegistry":
      """Create a Google Artifact Registry from a config.
  
      Arguments:
          config: A dictionary containing the following keys:
              repository: The repository name.
              image-name: The image name.
          environment: A GcpEnvironment configured for access to this registry.
  
      Returns:
          A GoogleArtifactRegistry.
      """
      # TODO: Replace this with pydantic.
      acceptable_keys = {
          "uri",
          "type",
          "repository",
          "image-name",
          "region",
          "project",
      }
      unacceptable_keys = set(config.keys()) - acceptable_keys
      if unacceptable_keys:
          raise LaunchError(
              f"The Google Artifact Registry config contains unacceptable keys: "
              f"{unacceptable_keys}. Please remove these keys. The acceptable "
              f"keys are: {acceptable_keys}."
          )
      return cls(
          uri=config.get("uri"),
          repository=config.get("repository"),
          image_name=config.get("image-name"),
          project=config.get("project"),
          region=config.get("region"),
      )
  
file_path: wandb/wandb/sdk/launch/registry/google_artifact_registry.py
imports: import logging
  from typing import Optional, Tuple
  import google.auth
  import google.cloud.artifactregistry
  from wandb.sdk.launch.errors import LaunchError
  from wandb.sdk.launch.utils import GCP_ARTIFACT_REGISTRY_URI_REGEX, event_loop_thread_exec
  from wandb.util import get_module
  from .abstract import AbstractRegistry
label_desc: Use image node_id 2 for calling the GoogleArtifactRegistry obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls