code: def sync_db(
      sync_connection: "Connection",
  ) -> Generator["Session", None, None]:
      sync_connection.begin_nested()
      session = SyncTestSession()
  
      yield session
  
      session.close()
      SyncTestSession.remove()
      sync_connection.rollback()
  
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 4 for calling a global function with example usage: sync_db(sync_connection) without return types