code: def sync_connection() -> Generator["Connection", None, None]:
      engine = create_engine(database_url_sync())
      conn = engine.connect()
      SyncTestSession.configure(bind=conn)
      migrate_db("head")
  
      yield conn
  
      migrate_db("base")
      conn.close()
      engine.dispose()
  
file_path: argilla/tests/unit/conftest.py
imports: import asyncio
  from typing import TYPE_CHECKING, AsyncGenerator, Generator
  import httpx
  import pytest
  import pytest_asyncio
  from argilla.server.cli.database.migrate import migrate_db
  from argilla.server.database import database_url_sync
  from argilla.server.settings import settings
  from sqlalchemy import NullPool, create_engine
  from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
  from tests.database import SyncTestSession, TestSession, set_task
label_desc: Use image node_id 3 for calling a global function with example usage: sync_connection() without return types