code: def async_db_proxy(
      mocker: "MockerFixture", sync_db: "Session"
  ) -> "AsyncSession":
      """Create a mocked `AsyncSession` that proxies to the sync session. This will allow us to execute the async CLI commands
      and then in the unit test function use the sync session to assert the changes.
  
      Args:
          mocker: pytest-mock fixture.
          sync_db: Sync session.
  
      Returns:
          Mocked `AsyncSession` that proxies to the sync session.
      """
      async_session = AsyncSession()
      async_session.sync_session = sync_db
      async_session._proxied = sync_db
      async_session.close = mocker.AsyncMock()
  
      return async_session
  
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 5 for calling a global function with example usage: async_db_proxy(mocker, sync_db) and returns: async_session