async def _sync_transformers(
    db: AsyncSession, transformers: list[Callable], module_entity_map: Dict[str, dict]
) -> None:
    """Sync transformers with the database.

    Args:
        db (AsyncSession): Database session
        transformers (list[Callable]): List of transformer functions
        module_entity_map (Dict[str, dict]): Mapping of module names to their entity details
    """
    sync_logger.info("Syncing transformers to database.")

    # Build entity mappings
    _, entity_name_to_id_map = _build_entity_mappings(module_entity_map)

    # Create transformer definitions
    transformer_definitions = [
        _create_transformer_definition(func, entity_name_to_id_map) for func in transformers
    ]

    await crud.transformer.sync(db, transformer_definitions, unique_field="method_name")
    sync_logger.info(f"Synced {len(transformer_definitions)} transformers to database.")
Sync transformers with the database.

    Args:
        db (AsyncSession): Database session
        transformers (list[Callable]): List of transformer functions
        module_entity_map (Dict[str, dict]): Mapping of module names to their entity details
    
backend/airweave/platform/db_sync.py