code: def datasets_dao(
      records_dao: DatasetRecordsDAO, es: GenericElasticEngineBackend
  ):
      return DatasetsDAO.get_instance(es=es, records_dao=records_dao)
  
imports: import contextlib
  import uuid
  from typing import TYPE_CHECKING, Dict, Generator
  import pytest
  import pytest_asyncio
  from argilla.server import telemetry
  from argilla.server.constants import API_KEY_HEADER_NAME, DEFAULT_API_KEY
  from argilla.server.daos.backend import GenericElasticEngineBackend
  from argilla.server.daos.datasets import DatasetsDAO
  from argilla.server.daos.records import DatasetRecordsDAO
  from argilla.server.database import get_async_db
  from argilla.server.models import User, UserRole, Workspace
  from argilla.server.search_engine import SearchEngine, get_search_engine
  from argilla.server.settings import settings
  from argilla.server.telemetry import TelemetryClient
  from httpx import AsyncClient
  from opensearchpy import OpenSearch
  from tests.database import TestSession
  from tests.factories import AnnotatorFactory, OwnerFactory, UserFactory
label_desc: Use image node_id 8 for calling a global function with example usage: datasets_dao(records_dao, es) and returns: DatasetsDAO