let with_bracket test_ctxt bracket f =
  section_ctxt test_ctxt
    (fun test_ctxt ->
       let res = bracket test_ctxt in
         f res test_ctxt)