MAINT: move the code that computes the one-norm of a power of a non-negative matrix into its own function, and add a test