code: def load_configuration(configuration):
      
      if isinstance(configuration, dict):
          return configuration
      else:
          with open(configuration) as configfile:
              return json.load(configfile)
docs: Returns a dictionary, accepts a dictionary or a path to a JSON file.