async def get(self, db: AsyncSession, id: UUID, current_user: User) -> Optional[ModelType]:
        """Get a single object by ID.

        Args:
        ----
            db (AsyncSession): The database session.
            id (UUID): The UUID of the object to get. Doesn't require strict typing.
            current_user (User): The current user.

        Returns:
        -------
            Optional[ModelType]: The object with the given ID.

        """
        query = select(self.model).where(self.model.id == id)
        result = await db.execute(query)
        db_obj = result.unique().scalar_one_or_none()

        if db_obj is None:
            return None

        self._validate_if_user_has_permission(db_obj, current_user)

        return db_obj
Get a single object by ID.

        Args:
        ----
            db (AsyncSession): The database session.
            id (UUID): The UUID of the object to get. Doesn't require strict typing.
            current_user (User): The current user.

        Returns:
        -------
            Optional[ModelType]: The object with the given ID.

        
backend/airweave/crud/_base.py