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: Apply correct order of keys in self.G
docstr_tok: ["Apply","correct","order","of","keys","in","self.G"]
code: def _reorder_keys(self, G):
      """Apply correct order of keys in self.G"""
  
      # Graphs:
      graphs_key_order = ["id", "data", "meta"]
      # reorder keys in g to graphs_key_order:
      G["graphs"] = [
          OrderedDict((k, g[k]) for k in graphs_key_order)
          for g in G["graphs"]
      ]
  
      # Vertices:
      vertices_key_order = ["id", "data", "meta"]
      # reorder keys in v to vertices_key_order:
      G["vertices"] = [
          OrderedDict((k, v[k]) for k in vertices_key_order)
          for v in G["vertices"]
      ]
  
      # Edges:
      edges_key_order = ["id", "source", "target", "data", "meta"]
      # reorder keys in e to edges_key_order:
      G["edges"] = [
          OrderedDict((k, e[k]) for k in edges_key_order)
          for e in G["edges"]
      ]
  
      return G
  
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 5 for calling the EPGM obj's underlying member method code with example usage: obj._reorder_keys(G) and returns: G