code: def test_get_credentials_and_project_id_with_key_secret_name(
      self,
      mock_secret_manager_client,
      mock_from_service_account_info,
      mock_default,
  ):
      mock_secret_manager_client.return_value.is_valid_secret_name.return_value = (
          True
      )
      mock_secret_manager_client.return_value.get_secret.return_value = (
          '{"type":"service_account","project_id":"pid",'
          '"private_key_id":"pkid",'
          '"private_key":"payload"}'
      )
  
      get_credentials_and_project_id(key_secret_name="secret name")
      mock_from_service_account_info.assert_called_once_with(
          {
              "type": "service_account",
              "project_id": "pid",
              "private_key_id": "pkid",
              "private_key": "payload",
          },
          scopes=ANY,
      )
  
imports: from __future__ import annotations
  import json
  import logging
  import os
  import re
  from contextlib import contextmanager
  from io import StringIO
  from tempfile import NamedTemporaryFile
  from unittest import mock
  from unittest.mock import ANY
  from uuid import uuid4
  import pytest
  from google.auth.environment_vars import CREDENTIALS
  from google.auth.exceptions import DefaultCredentialsError
  from airflow.exceptions import AirflowException
  from airflow.providers.google.cloud.utils.credentials_provider import _DEFAULT_SCOPES, AIRFLOW_CONN_GOOGLE_CLOUD_DEFAULT, _get_project_id_from_service_account_email, _get_scopes, _get_target_principal_and_delegates, build_gcp_conn, get_credentials_and_project_id, provide_gcp_conn_and_credentials, provide_gcp_connection, provide_gcp_credentials
label_desc: Use image node_id 14 for calling the TestGetGcpCredentialsAndProjectId obj's underlying member method code with example usage: obj.test_get_credentials_and_project_id_with_key_secret_name(mock_secret_manager_client, mock_from_service_account_info, mock_default) without return types