get_diagonals documentation update
bugfixes, improvements to get_diagonals

made the function clearer to read,
added/reformatted comments in function body
corrected function behavior so it passes tests
added debug_get_diagonals