code: def _onenorm_matrix_power_nnm(A, p):
      """
      Compute the 1-norm of a non-negative integer power of a non-negative matrix.
  
      Parameters
      ----------
      A : a square ndarray or matrix or sparse matrix
          Input matrix with non-negative entries.
      p : non-negative integer
          The power to which the matrix is to be raised.
  
      Returns
      -------
      out : float
          The 1-norm of the matrix power p of A.
  
      """
      # check input
      if int(p) != p or p < 0:
          raise ValueError("expected non-negative integer p")
      p = int(p)
      if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
          raise ValueError("expected A to be like a square matrix")
  
      # Explicitly make a column vector so that this works when A is a
      # numpy matrix (in addition to ndarray and sparse matrix).
      v = np.ones((A.shape[0], 1), dtype=float)
      M = A.T
      for i in range(p):
          v = M.dot(v)
      return np.max(v)
  
imports: from __future__ import division, print_function, absolute_import
  import math
  import numpy
  import scipy.special
  from scipy.linalg.basic import solve, solve_triangular
  from scipy.sparse.base import isspmatrix
  from scipy.sparse.construct import eye
  from scipy.sparse.linalg import spsolve
  import scipy.sparse
  import scipy.sparse.linalg
  from scipy.sparse.linalg.interface import LinearOperator
label_desc: Use image node_id 2 for calling a global function with example usage: _onenorm_matrix_power_nnm(A, p) and returns: np