class_docstr: GCP Environment.
  
  Attributes:
      region: The GCP region.
class_docstr_tok: ["GCP","Environment",".","Attributes",":","region",":","The","GCP","region","."]
docstr: Create a GcpEnvironment from a config dictionary.
  
  Arguments:
      config: The config dictionary.
  
  Returns:
      GcpEnvironment: The GcpEnvironment.
docstr_tok: ["Create","a","GcpEnvironment","from","a","config","dictionary",".","Arguments",":","config",":","The","config","dictionary",".","Returns",":","GcpEnvironment",":","The","GcpEnvironment","."]
code: def from_config(cls, config: dict) -> "GcpEnvironment":
      """Create a GcpEnvironment from a config dictionary.
  
      Arguments:
          config: The config dictionary.
  
      Returns:
          GcpEnvironment: The GcpEnvironment.
      """
      if config.get("type") != "gcp":
          raise LaunchError(
              f"Could not create GcpEnvironment from config. Expected type 'gcp' "
              f"but got '{config.get('type')}'."
          )
      region = config.get("region", None)
      if not region:
          raise LaunchError(
              "Could not create GcpEnvironment from config. Missing 'region' "
              "field."
          )
      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 2 for calling the GcpEnvironment obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls