This code is confusing (partially because notes is a terrible key name). Can you just add a comment saying "simulates resuming a previously started transaction"