code: def extract_diagonal(A):
      raise NotImplementedError("use .diagonal() instead")
  
imports: from __future__ import division, print_function, absolute_import
  from .csr import isspmatrix_csr, csr_matrix
  from .csc import isspmatrix_csc
  from ._sparsetools import csr_count_blocks
label_desc: Use image node_id 1 for calling a global function with example usage: extract_diagonal(A) without return types