code: def test_extract_cloud_key(monkeypatch):
      k = "GOOGLE_APPLICATION_CREDENTIALS"
      if os.environ.get(k):
          monkeypatch.delenv(k)
  
      # initial missing case.
      assert c.extract_cloud_key({}) == None
  
      monkeypatch.setenv(k, "key.json")
  
      # env override:
      assert c.extract_cloud_key({}) == "key.json"
  
      # conf takes precedence.
      assert (
          c.extract_cloud_key({"cloud_key": "mynewkey.json"})
          == "mynewkey.json"
      )
  
file_path: caliban/tests/caliban/config/test_config.py
imports: import json
  import os
  from argparse import ArgumentTypeError
  import hypothesis.strategies
  from hypothesis import given
  import caliban.config
  import caliban.platform.cloud.types
  import caliban.util.schema
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_extract_cloud_key(monkeypatch) without return types