code: def sparse_to_tuple(sparse_mx):
      """Convert sparse matrix to tuple representation."""
  
      def to_tuple(mx):
          if not sp.isspmatrix_coo(mx):
              mx = mx.tocoo()
          coords = np.vstack((mx.row, mx.col)).transpose()
          values = mx.data
          shape = mx.shape
          return coords, values, shape
  
      if isinstance(sparse_mx, list):
          for i in range(len(sparse_mx)):
              sparse_mx[i] = to_tuple(sparse_mx[i])
      else:
          sparse_mx = to_tuple(sparse_mx)
  
      return sparse_mx
  
file_path: OpenNE/src/openne/gcn/utils.py
imports: import numpy
  import pickle
  import networkx
  import scipy.sparse
  from scipy.sparse.linalg.eigen.arpack import eigsh
  import sys
label_desc: Use image node_id 4 for calling a global function with example usage: sparse_to_tuple(sparse_mx) and returns: sparse_mx, coords,  values,  shape