code: def __init__(
      self,
      input_json,
      graph_meta,
      output_dir,
      partition_num,
      pref="data",
  ):
      output_dir = os.path.realpath(output_dir)
      self.input_json = os.path.realpath(input_json)
      self.partition_num = int(partition_num)
      self.node_out = []
      self.edge_out = []
      mkdirs(os.path.join(output_dir, "Node"))
      mkdirs(os.path.join(output_dir, "Edge"))
      for i in range(0, partition_num):
          self.node_out.append(
              open(
                  os.path.join(
                      output_dir, "Node", pref + "_%d.dat" % (i)
                  ),
                  "wb",
              )
          )
          self.edge_out.append(
              open(
                  os.path.join(
                      output_dir, "Edge", pref + "_%d.dat" % (i)
                  ),
                  "wb",
              )
          )
      self.gmeta = GraphMeta("", "")
      self.gmeta.read(open(graph_meta, "rb").read())
      print(self.gmeta.debug_string())
      self.nodes = {}
      self.edges = []
      self.nodes_cnt = [0] * self.partition_num
      self.edges_cnt = [0] * self.partition_num
      self.node_type_weight = []
      self.edge_type_weight = []
  
file_path: euler/euler/tools/json2partdat.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import errno
  import json
  import sys
  import struct
  from euler.tools.util import *
  from euler.tools.node import Node
  from euler.tools.edge import Edge
  from euler.tools.graph_meta import GraphMeta
  import os
label_desc: Use image node_id 1 to create a new Converter object from inherited base classes: object with example: obj = Converter(input_json, graph_meta, output_dir, partition_num, pref)