code: def _init_masks(cluster_matrix, M, indices_row_pos, indptr):
      pos = 0
      for i in range(2 * M - 1):
          if i < M:
              pos += 1
          else:
              pos += int(cluster_matrix[i - M, 3])
          indptr[i + 1] = pos
          indices_row_pos[i] = indptr[i]
  
imports: import copy
  import numpy
  import scipy.sparse
  from numba import njit
  from ..None import links
label_desc: Use image node_id 8 for calling a global function with example usage: _init_masks(cluster_matrix, M, indices_row_pos, indptr) without return types