class_docstr: EPGM class with converter methods to edgelist, adjacency matrix, etc.
class_docstr_tok: ["EPGM","class","with","converter","methods","to","edgelist",",","adjacency","matrix",",","etc","."]
docstr: Return edgelist of a graph specified by its graph_id
docstr_tok: ["Return","edgelist","of","a","graph","specified","by","its","graph_id"]
code: def edgelist(self, graph_id, directed=False):
      """Return edgelist of a graph specified by its graph_id"""
  
      print("...extracting the edgelist...")
      # edgelist = nx.to_edgelist(self.to_nx(graph_id, directed))
      edgelist = [
          (e["source"], e["target"])
          for e in self.G["edges"]
          if graph_id in e["meta"]["graphs"]
      ]  # works much faster, gets the edgelist directly from the edges.json part of epgm graph
      print(" ...{} edges extracted...".format(len(edgelist)))
  
      return edgelist
  
imports: from collections import OrderedDict
  import networkx
  from networkx.readwrite import json_graph
  import os
  import json
  import uuid
  import numpy
  import scipy.sparse
  import multiprocessing
  from multiprocessing import Pool
  from functools import partial
  from time import sleep
label_desc: Use image node_id 15 for calling the EPGM obj's underlying member method code with example usage: obj.edgelist(graph_id, directed) and returns: edgelist