MAINT: move naive function to get posterior state distribution at nodes into a more generic module