code: def do(self):
      path_list = os.path.split(self.output)
      if len(path_list) > 1:
          if os.path.exists(os.path.join(*path_list[0:-1])):
              shutil.rmtree(os.path.join(*path_list[0:-1]))
          os.makedirs(os.path.join(*path_list[0:-1]))
  
      print("generate meta...")
      for inp in self.inputs:
          print("process " + inp)
          self.parse(json.loads(open(inp).read()))
  
      print(self.gmeta.debug_string())
      with open(self.output, "wb") as f:
          f.write(self.gmeta.write())
  
file_path: euler/euler/tools/json2meta.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import json
  import glob
  import os
  import shutil
  from euler.tools.util import *
  from euler.tools.graph_meta import GraphMeta
label_desc: Use image node_id 2 for calling the Generator obj's underlying member method code with example usage: obj.do() without return types