code: def test_from_config(
      mock_gcp_default_credentials, mock_gcp_artifact_registry_client
  ):
      """Test that the GoogleArtifactRegistry.from_config method works as expected."""
      config = {
          "uri": "us-central1-docker.pkg.dev/wandb-ml/vertex-ai/wandb-ml",
      }
      helper = GoogleArtifactRegistry.from_config(config)
      assert (
          helper.uri
          == "us-central1-docker.pkg.dev/wandb-ml/vertex-ai/wandb-ml"
      )
      assert helper.project == "wandb-ml"
      assert helper.region == "us-central1"
      assert helper.repository == "vertex-ai"
      # Test that we raise a LaunchError if we have unsupported keys.
      config["unsupported"] = "unsupported"
      with pytest.raises(LaunchError):
          GoogleArtifactRegistry.from_config(config)
  
file_path: wandb/tests/pytest_tests/unit_tests/test_launch/test_registry/test_gcp_artifact_registry.py
imports: from unittest.mock import MagicMock
  import google.api_core.exceptions
  import pytest
  from wandb.sdk.launch.registry.google_artifact_registry import GoogleArtifactRegistry
  from wandb.sdk.launch.utils import LaunchError
label_desc: Use image node_id 3 for calling a global function with example usage: test_from_config(mock_gcp_default_credentials, mock_gcp_artifact_registry_client) without return types