code: def config_parser(config_file):
      """Reads config files and creates domain objects."""
      if config_file.endswith(".json"):
          params = read_json(config_file)
      elif config_file.endswith(".pb"):
          params = read_pb(config_file)
      else:
          raise ValueError("Wrong Config file: %s" % (config_file))
      return params
  
file_path: dragonfly/dragonfly/parse/config_parser.py
imports: from __future__ import absolute_import
  import sys
  import json
  from collections import OrderedDict
  from numbers import Number
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: config_parser(config_file) and returns: params