code: def check_nn_config(f_config):
      """Check neural networks configuration.
  
      Args:
          f_config (dict): Neural network configuration.
  
      Raises:
          ValueError: If the parameters are not correct.
      """
      if f_config["model_type"] in ["fm", "FM"]:
          required_parameters = [
              "FEATURE_COUNT",
              "dim",
              "loss",
              "data_format",
              "method",
          ]
      elif f_config["model_type"] in ["lr", "LR"]:
          required_parameters = [
              "FEATURE_COUNT",
              "loss",
              "data_format",
              "method",
          ]
      elif f_config["model_type"] in ["dkn", "DKN"]:
          required_parameters = [
              "doc_size",
              "history_size",
              "wordEmb_file",
              "entityEmb_file",
              "contextEmb_file",
              "news_feature_file",
              "user_history_file",
              "word_size",
              "entity_size",
              "use_entity",
              "use_context",
              "data_format",
              "dim",
              "layer_sizes",
              "activation",
              "attention_activation",
              "attention_activation",
              "attention_dropout",
              "loss",
              "data_format",
              "dropout",
              "method",
              "num_filters",
              "filter_sizes",
          ]
      elif f_config["model_type"] in ["exDeepFM", "xDeepFM"]:
          required_parameters = [
              "FIELD_COUNT",
              "FEATURE_COUNT",
              "method",
              "dim",
              "layer_sizes",
              "cross_layer_sizes",
              "activation",
              "loss",
              "data_format",
              "dropout",
          ]
      if f_config["model_type"] in ["gru", "GRU"]:
          required_parameters = [
              "item_embedding_dim",
              "cate_embedding_dim",
              "max_seq_length",
              "loss",
              "method",
              "user_vocab",
              "item_vocab",
              "cate_vocab",
              "hidden_size",
          ]
      elif f_config["model_type"] in ["caser", "CASER", "Caser"]:
          required_parameters = [
              "item_embedding_dim",
              "cate_embedding_dim",
              "user_embedding_dim",
              "max_seq_length",
              "loss",
              "method",
              "user_vocab",
              "item_vocab",
              "cate_vocab",
              "T",
              "L",
              "n_v",
              "n_h",
              "min_seq_length",
          ]
      elif f_config["model_type"] in ["asvd", "ASVD", "a2svd", "A2SVD"]:
          required_parameters = [
              "item_embedding_dim",
              "cate_embedding_dim",
              "max_seq_length",
              "loss",
              "method",
              "user_vocab",
              "item_vocab",
              "cate_vocab",
          ]
      elif f_config["model_type"] in [
          "slirec",
          "sli_rec",
          "SLI_REC",
          "Sli_rec",
      ]:
          required_parameters = [
              "item_embedding_dim",
              "cate_embedding_dim",
              "max_seq_length",
              "loss",
              "method",
              "user_vocab",
              "item_vocab",
              "cate_vocab",
              "attention_size",
              "hidden_size",
              "att_fcn_layer_sizes",
          ]
      elif f_config["model_type"] in [
          "nextitnet",
          "next_it_net",
          "NextItNet",
          "NEXT_IT_NET",
      ]:
          required_parameters = [
              "item_embedding_dim",
              "cate_embedding_dim",
              "user_embedding_dim",
              "max_seq_length",
              "loss",
              "method",
              "user_vocab",
              "item_vocab",
              "cate_vocab",
              "dilations",
              "kernel_size",
              "min_seq_length",
          ]
      else:
          required_parameters = []
  
      # check required parameters
      for param in required_parameters:
          if param not in f_config:
              raise ValueError(
                  "Parameters {0} must be set".format(param)
              )
  
      if f_config["model_type"] in ["exDeepFM", "xDeepFM"]:
          if f_config["data_format"] != "ffm":
              raise ValueError(
                  "For xDeepFM model, data format must be 'ffm', but your set is {0}".format(
                      f_config["data_format"]
                  )
              )
      elif f_config["model_type"] in ["dkn", "DKN"]:
          if f_config["data_format"] != "dkn":
              raise ValueError(
                  "For dkn model, data format must be 'dkn', but your set is {0}".format(
                      f_config["data_format"]
                  )
              )
      check_type(f_config)
  
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 3 for calling a global function with example usage: check_nn_config(f_config) without return types