code: def load_config(name, base='conf'):
      
      fname = pjoin(base, name + '.json')
      if not os.path.exists(fname):
          return {}
      try:
          with open(fname) as f:
              cfg = json.load(f)
      except Exception as e:
          warn("Couldn't load %s: %s" % (fname, e))
          cfg = {}
      return cfg
docs: Load config dict from JSON