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",
          "entity_size",
          "doc_size",
          "history_size",
          "FEATURE_COUNT",
          "FIELD_COUNT",
          "dim",
          "epochs",
          "batch_size",
          "show_step",
          "save_epoch",
          "PAIR_NUM",
          "DNN_FIELD_NUM",
          "attention_layer_sizes",
          "n_user",
          "n_item",
          "n_user_attr",
          "n_item_attr",
          "item_embedding_dim",
          "cate_embedding_dim",
          "user_embedding_dim",
          "max_seq_length",
          "hidden_size",
          "T",
          "L",
          "n_v",
          "n_h",
          "kernel_size",
          "min_seq_length",
          "attention_size",
          "epochs",
          "batch_size",
          "show_step",
          "save_epoch",
          "train_num_ngs",
      ]
      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 = [
          "init_value",
          "learning_rate",
          "embed_l2",
          "embed_l1",
          "layer_l2",
          "layer_l1",
          "mu",
      ]
      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 = [
          "train_file",
          "eval_file",
          "test_file",
          "infer_file",
          "method",
          "load_model_name",
          "infer_model_name",
          "loss",
          "optimizer",
          "init_method",
          "attention_activation",
          "user_vocab",
          "item_vocab",
          "cate_vocab",
      ]
      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",
          "dropout",
          "att_fcn_layer_sizes",
          "dilations",
      ]
      for param in list_parameters:
          if param in config and not isinstance(config[param], list):
              raise TypeError(
                  "Parameters {0} must be list".format(param)
              )
  
imports: import os
  from sklearn.metrics import roc_auc_score, log_loss, mean_squared_error, accuracy_score, f1_score
  import numpy
  import yaml
  import zipfile
  import pickle
  from recommenders.datasets.download_utils import maybe_download
label_desc: Use image node_id 2 for calling a global function with example usage: check_type(config) without return types