class_docstr: GCP Environment.
  
  Attributes:
      region: The GCP region.
class_docstr_tok: ["GCP","Environment",".","Attributes",":","region",":","The","GCP","region","."]
docstr: Create a GcpEnvironment from the default configuration.
  
  Returns:
      GcpEnvironment: The GcpEnvironment.
docstr_tok: ["Create","a","GcpEnvironment","from","the","default","configuration",".","Returns",":","GcpEnvironment",":","The","GcpEnvironment","."]
code: def from_default(
      cls,
  ) -> "GcpEnvironment":
      """Create a GcpEnvironment from the default configuration.
  
      Returns:
          GcpEnvironment: The GcpEnvironment.
      """
      region = get_default_region()
      if region is None:
          raise LaunchError(
              "Could not create GcpEnvironment from user's gcloud configuration. "
              "Please set the default region with `gcloud config set compute/region` "
              "or set the environment variable {GCP_REGION_ENV_VAR}. "
              "Alternatively, you may specify the region explicitly in your "
              "wandb launch configuration at `$HOME/.config/wandb/launch-config.yaml`. "
              "See https://docs.wandb.ai/guides/launch/run-agent#environments for more information."
          )
      return cls(region=region)
  
file_path: wandb/wandb/sdk/launch/environment/gcp_environment.py
imports: import logging
  import os
  import subprocess
  from typing import Optional
  from wandb.sdk.launch.errors import LaunchError
  from wandb.util import get_module
  from ..utils import GCS_URI_RE, event_loop_thread_exec
  from .abstract import AbstractEnvironment
label_desc: Use image node_id 3 for calling the GcpEnvironment obj's underlying member method code with example usage: obj.from_default(cls) and returns: cls