code: def load_config(path):
      
      path = os.path.abspath(path)
      if os.path.isdir(path):
          config, wordlists = _load_data(path)
      elif os.path.isfile(path):
          config = _load_config(path)
          wordlists = {}
      else:
          raise InitializationError('File or directory not found: {0}'.format(path))
      for name, wordlist in wordlists.items():
          if name in config:
              raise InitializationError("Conflict: list {!r} is defined both in config "
                                        "and in *.txt file. If it's a {!r} list, "
                                        "you should remove it from config."
                                        .format(name, _CONF.TYPE.WORDS))
          config[name] = wordlist
      return config
docs: Loads configuration from a path.
  
      Path can be a json file, or a directory containing config.json
      and zero or more *.txt files with word lists or phrase lists.
  
      Returns config dict.
  
      Raises InitializationError when something is wrong.