Here I log some technical debt in gn3 as a checklist.
- [x] Clean up gn3/db/traits.py: Some of those functions are long, and
repetitive. Also, we have no tests for most of them.
This issue is too general in scope so I'm going ahead to close it.