code: def sp_tensor_to_sp_matrix(a):
      """
      Transforms a sparse tensor into a sparse scipy matrix .
      **Arguments**
      - `a`: sparse `(n_nodes, n_nodes)` graph tensor;
      """
      a_idx = a.indices
      a_val = a.values
  
      row_idx = a_idx[:, 0]
      col_idx = a_idx[:, 1]
  
      return csr_matrix((a_val, (row_idx, col_idx)), shape=a.shape)
  
file_path: spektral/spektral/models/gnn_explainer.py
imports: import networkx
  import numpy
  import tensorflow
  from scipy.sparse import csr_matrix
  from spektral.layers import MessagePassing
  from spektral.layers.convolutional.conv import Conv
  from spektral.layers.ops import dot
  from spektral.utils.sparse import sp_matrix_to_sp_tensor
label_desc: Use image node_id 3 for calling a global function with example usage: sp_tensor_to_sp_matrix(a) and returns: csr_matrix