code: def _get_first_party_connection(connection_class: str):
      if connection_class in FIRST_PARTY_CONNECTIONS:
          return FIRST_PARTY_CONNECTIONS[connection_class]
  
      raise StreamlitAPIException(
          f"Invalid connection '{connection_class}'. "
          f"Supported connection classes: {FIRST_PARTY_CONNECTIONS}"
      )
  
imports: from __future__ import annotations
  import importlib
  import os
  import re
  from datetime import timedelta
  from typing import Any, Dict, Type, TypeVar, overload
  from typing_extensions import Final, Literal
  from streamlit.connections import BaseConnection, SnowflakeConnection, SnowparkConnection, SQLConnection
  from streamlit.deprecation_util import deprecate_obj_name
  from streamlit.errors import StreamlitAPIException
  from streamlit.runtime.caching import cache_resource
  from streamlit.runtime.metrics_util import gather_metrics
  from streamlit.runtime.secrets import secrets_singleton
label_desc: Use image node_id 2 for calling a global function with example usage: _get_first_party_connection(connection_class) and returns: FIRST_PARTY_CONNECTIONS