This is inside a yml.transaction {} block. That takes care of the write for you.