code: def concatenate_graphs(G1, G2):
      """Returns  the concatenation of the graphs G1 and G2
      It is thus assumed that the vertices of G1 and G2 represent disjoint sets
  
      Parameters
      ----------
      G1, G2: the two WeightedGraph instances  to be concatenated
  
      Returns
      -------
      G, WeightedGraph, the concatenated graph
  
      Notes
      -----
      This implies that the vertices of G corresponding to G2 are labeled [G1.V ..
      G1.V+G2.V]
      """
      V = G1.V + G2.V
      edges = np.vstack((G1.edges, G1.V + G2.edges))
      weights = np.hstack((G1.weights, G2.weights))
      G = WeightedGraph(V, edges, weights)
      return G
  
imports: import numpy
  from scipy.sparse import coo_matrix
label_desc: Use image node_id 10 for calling a global function with example usage: concatenate_graphs(G1, G2) and returns: G