Written by, aye. Would probably imagine it generates a livable income for her and certainly tops his up quite nicely, depending on the publishing deal they arranged.
speaking of which has anyone ever checked out Terius Nash/The-Dream’s songwriting catalogue? He’s famously very on the ball at making sure he gets full publishing and royalties deals, no buy-outs. Not even clued up enough to guess whether this is netting him 10s or 100s of millions p/a but a few of those (Baby, Single Ladies, Umbrella) are probably equivalent to a winning lottery ticket each, over a lifetime