code: def test_nested_gs_credentials(monkeypatch):
      """Check that rasterio.open() doesn't wipe out surrounding credentials"""
  
      @ensure_env_with_credentials
      def fake_opener(path):
          return fiona.env.getenv()
  
      with fiona.env.Env(
          session=GSSession(google_application_credentials="foo")
      ):
          assert (
              fiona.env.getenv()["GOOGLE_APPLICATION_CREDENTIALS"]
              == "foo"
          )
  
          gdalenv = fake_opener("gs://foo/bar")
          assert gdalenv["GOOGLE_APPLICATION_CREDENTIALS"] == "foo"
  
file_path: Fiona/tests/test_env.py
imports: import os
  import sys
  from unittest import mock
  import boto3
  import pytest
  import fiona
  from fiona import _env
  from fiona.env import getenv, hasenv, ensure_env, ensure_env_with_credentials
  from fiona.errors import FionaDeprecationWarning
  from fiona.session import AWSSession, GSSession
label_desc: Use image node_id 9 for calling a global function with example usage: test_nested_gs_credentials(monkeypatch) and returns: fiona