code: def test_aws_session_class_profile(tmpdir, monkeypatch):
      """Confirm that profile_name kwarg works."""
      pytest.importorskip("boto3")
      credentials_file = tmpdir.join("credentials")
      credentials_file.write(
          "[testing]\n"
          "aws_access_key_id = foo\n"
          "aws_secret_access_key = bar\n"
          "aws_session_token = baz"
      )
      monkeypatch.setenv(
          "AWS_SHARED_CREDENTIALS_FILE", str(credentials_file)
      )
      monkeypatch.setenv("AWS_SESSION_TOKEN", "ignore_me")
      sesh = AWSSession(profile_name="testing")
      assert sesh._session
      assert sesh.get_credential_options()["AWS_ACCESS_KEY_ID"] == "foo"
      assert (
          sesh.get_credential_options()["AWS_SECRET_ACCESS_KEY"]
          == "bar"
      )
      assert sesh.get_credential_options()["AWS_SESSION_TOKEN"] == "baz"
      monkeypatch.undo()
  
imports: from unittest import mock
  import pytest
  from rasterio.session import DummySession, AWSSession, Session, OSSSession, GSSession, SwiftSession, AzureSession, parse_bool
label_desc: Use image node_id 9 for calling a global function with example usage: test_aws_session_class_profile(tmpdir, monkeypatch) without return types