code: def check_type(config):
      """Check that the config parameters are the correct type
  
      Args:
          config (dict): Configuration dictionary.
  
      Raises:
          TypeError: If the parameters are not the correct type.
      """
  
      int_parameters = [
          "word_size",
          "his_size",
          "title_size",
          "body_size",
          "npratio",
          "word_emb_dim",
          "attention_hidden_dim",
          "epochs",
          "batch_size",
          "show_step",
          "save_epoch",
          "head_num",
          "head_dim",
          "user_num",
          "filter_num",
          "window_size",
          "gru_unit",
          "user_emb_dim",
          "vert_emb_dim",
          "subvert_emb_dim",
      ]
      for param in int_parameters:
          if param in config and not isinstance(config[param], int):
              raise TypeError(
                  "Parameters {0} must be int".format(param)
              )
  
      float_parameters = ["learning_rate", "dropout"]
      for param in float_parameters:
          if param in config and not isinstance(config[param], float):
              raise TypeError(
                  "Parameters {0} must be float".format(param)
              )
  
      str_parameters = [
          "wordEmb_file",
          "wordDict_file",
          "userDict_file",
          "vertDict_file",
          "subvertDict_file",
          "method",
          "loss",
          "optimizer",
          "cnn_activation",
          "dense_activation" "type",
      ]
      for param in str_parameters:
          if param in config and not isinstance(config[param], str):
              raise TypeError(
                  "Parameters {0} must be str".format(param)
              )
  
      list_parameters = ["layer_sizes", "activation"]
      for param in list_parameters:
          if param in config and not isinstance(config[param], list):
              raise TypeError(
                  "Parameters {0} must be list".format(param)
              )
  
      bool_parameters = ["support_quick_scoring"]
      for param in bool_parameters:
          if param in config and not isinstance(config[param], bool):
              raise TypeError(
                  "Parameters {0} must be bool".format(param)
              )
  
file_path: recommenders/recommenders/models/newsrec/newsrec_utils.py
imports: from recommenders.models.deeprec.deeprec_utils import flat_config, HParams, load_yaml
  import random
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: check_type(config) without return types