code: def consecutive_entries_per_row(M):
      # count the number of consecutive column indicies
      # for each row of a saprse CSR matrix sparse CSR.
      # not to be mixed with the longest sequence or the number of sequences
      v = [0] * M.shape[0]
      for i in range(M.shape[0]):
          v[i] = count_consecutive(
              M.indices[M.indptr[i] : M.indptr[i + 1]]
          )
      return np.array(v)
  
file_path: cugraph/python/utils/analyse_mtx_sparsity.py
imports: import numpy
  import sys
  from scipy.io import mmread
  import scipy.sparse
  import networkx
  import matplotlib.pyplot
label_desc: Use image node_id 3 for calling a global function with example usage: consecutive_entries_per_row(M) and returns: np