class_docstr: temporary class to handle meshes
class_docstr_tok: ["temporary","class","to","handle","meshes"]
docstr: Returns a sparse matrix that represents the connectivity in self
          
code: def topology(self):
      """Returns a sparse matrix that represents the connectivity in self"""
      E = len(self.triangles)
      edges = np.zeros((3 * E, 2))
      weights = np.ones(3 * E)
  
      for i in range(E):
          sa, sb, sc = self.triangles[i]
          edges[3 * i] = np.array([sa, sb])
          edges[3 * i + 1] = np.array([sa, sc])
          edges[3 * i + 2] = np.array([sb, sc])
  
      G = WeightedGraph(self.V, edges, weights)
  
      # symmeterize the graph
      G = G.symmeterize()
  
      # remove redundant edges
      G = G.cut_redundancies()
  
      # make it a metric graph
      G.set_euclidian(self.coord)
      return G.to_coo_matrix()
  
imports: import numpy
  import scipy.sparse
  from nibabel import Nifti1Image, load, save
  from nipy.algorithms.graph import WeightedGraph, wgraph_from_3d_grid, wgraph_from_coo_matrix
  from nipy.io.nibcompat import get_affine, get_header
label_desc: Use image node_id 3 for calling the MeshDomain obj's underlying member method code with example usage: obj.topology() and returns: G