async def cleanup_resource(cleanup_func,
                               resource_id: Optional[str] = None) -> None:
        """Generic cleanup helper that won't fail the test if cleanup fails."""
        if resource_id:
            try:
                await cleanup_func(id=resource_id)
            except R2RException:
                pass
Generic cleanup helper that won't fail the test if cleanup fails.
py/tests/integration/test_base.py