code: def load_prototxt(config_file, config):
      """
      Args:
          config_file: model configuration file.
          config: ModelConfig class
      """
      logger.info("Loading LDA config.")
      with open(config_file, "r", encoding="utf-8") as f:
          yaml_dict = yaml.load(f, Loader=yaml.FullLoader)
  
      # Assignment.
      if yaml_dict["type"] == "LDA":
          config.type = ModelType.LDA
      else:
          config.type = ModelType.SLDA
      config.num_topics = yaml_dict["num_topics"]
      config.alpha = yaml_dict["alpha"]
      config.beta = yaml_dict["beta"]
      config.word_topic_file = yaml_dict["word_topic_file"]
      config.vocab_file = yaml_dict["vocab_file"]
  
file_path: PaddleHub/modules/text/language_model/lda_news/util.py
imports: import time
  import yaml
  import numpy
  from paddlehub.common.logger import logger
  from lda_news.config import ModelType
label_desc: Use image node_id 1 for calling a global function with example usage: load_prototxt(config_file, config) without return types