code: def save_config(name, data, base='conf'):
      
      if not os.path.exists(base):
          os.mkdir(base)
      fname = pjoin(base, name+'.json')
      with open(fname, 'w') as f:
          json.dump(data, f, indent=2)
docs: Save config dict to JSON