code: def test_onenorm_matrix_power_nnm():
      np.random.seed(1234)
      for n in range(1, 5):
          for p in range(5):
              M = np.random.random((n, n))
              Mp = np.linalg.matrix_power(M, p)
              observed = _onenorm_matrix_power_nnm(M, p)
              expected = np.linalg.norm(Mp, 1)
              assert_allclose(observed, expected)
  
imports: import math
  import numpy
  from numpy import array, eye, exp, random
  from numpy.testing import assert_allclose, assert_, assert_array_almost_equal, assert_equal, assert_array_almost_equal_nulp, suppress_warnings
  from scipy.sparse import csc_matrix, csc_array, SparseEfficiencyWarning
  from scipy.sparse._construct import eye
  from scipy.sparse.linalg._matfuncs import expm, _expm, ProductOperator, MatrixPowerOperator, _onenorm_matrix_power_nnm, matrix_power
  from scipy.sparse._sputils import matrix
  from scipy.linalg import logm
  from scipy.special import factorial, binom
  import scipy.sparse
  import scipy.sparse.linalg
label_desc: Use image node_id 2 for calling a global function with example usage: test_onenorm_matrix_power_nnm() without return types