def METHOD_NAME(
        stmt: irast.DeleteStmt, *,
        ctx: context.CompilerContextLevel) -> pgast.Query:
    parent_ctx = ctx
    with parent_ctx.substmt() as ctx:
        # Common DML bootstrap
        parts = dml.init_dml_stmt(stmt, ctx=ctx)
        range_cte = parts.range_cte
        assert range_cte is not None
        ctx.toplevel_stmt.append_cte(range_cte)
        for typeref, (delete_cte, _) in parts.dml_ctes.items():
            dml.process_delete_body(
                ir_stmt=stmt,
                delete_cte=delete_cte,
                typeref=typeref,
                ctx=ctx,
            )
        # Wrap up.
        return dml.fini_dml_stmt(stmt, ctx.rel, parts, ctx=ctx)