code: def sparse_to_tuple(sparse_mx):
      if not sp.isspmatrix_coo(sparse_mx):
          sparse_mx = sparse_mx.tocoo()
      coords = np.vstack((sparse_mx.row, sparse_mx.col)).transpose()
      values = sparse_mx.data
      shape = sparse_mx.shape
      return coords, values, shape
  
file_path: graph4nlp/graph4nlp/pytorch/test/link_prediction/utils.py
imports: import pickle
  import networkx
  import numpy
  import scipy.sparse
  import torch
  from sklearn.metrics import average_precision_score, roc_auc_score
label_desc: Use image node_id 3 for calling a global function with example usage: sparse_to_tuple(sparse_mx) and returns: coords,  values,  shape