async def get_by_readable_id(
        self, db: AsyncSession, readable_id: str, current_user: schemas.User
    ) -> Optional[Collection]:
        """Get a collection by its readable ID with computed ephemeral status."""
        result = await db.execute(select(Collection).where(Collection.readable_id == readable_id))
        collection = result.scalar_one_or_none()

        if collection is None:
            return None

        self._validate_if_user_has_permission(collection, current_user)

        # Compute and set the ephemeral status
        collection = (await self._attach_ephemeral_status(db, [collection], current_user))[0]

        return collection
Get a collection by its readable ID with computed ephemeral status.
backend/airweave/crud/crud_collection.py