in google/cloud/sql/connector/client.py [0:0]
def _format_user_agent(driver: Optional[str], custom: Optional[str]) -> str:
agent = f"{USER_AGENT}+{driver}" if driver else USER_AGENT
if custom and isinstance(custom, str):
agent = f"{agent} {custom}"
return agent