code: def create_hparams(flags):
      """Create the model hyperparameters.
  
      Args:
          flags (dict): Dictionary with the model requirements.
  
      Returns:
          HParams: Hyperparameter object.
      """
      init_dict = {
          # dkn
          "use_entity": True,
          "use_context": True,
          # model
          "cross_activation": "identity",
          "user_dropout": False,
          "dropout": [0.0],
          "attention_dropout": 0.0,
          "load_saved_model": False,
          "fast_CIN_d": 0,
          "use_Linear_part": False,
          "use_FM_part": False,
          "use_CIN_part": False,
          "use_DNN_part": False,
          # train
          "init_method": "tnormal",
          "init_value": 0.01,
          "embed_l2": 0.0,
          "embed_l1": 0.0,
          "layer_l2": 0.0,
          "layer_l1": 0.0,
          "cross_l2": 0.0,
          "cross_l1": 0.0,
          "reg_kg": 0.0,
          "learning_rate": 0.001,
          "lr_rs": 1,
          "lr_kg": 0.5,
          "kg_training_interval": 5,
          "max_grad_norm": 2,
          "is_clip_norm": 0,
          "dtype": 32,
          "optimizer": "adam",
          "epochs": 10,
          "batch_size": 1,
          "enable_BN": False,
          # show info
          "show_step": 1,
          "save_model": True,
          "save_epoch": 5,
          "write_tfevents": False,
          # sequential
          "train_num_ngs": 4,
          "need_sample": True,
          "embedding_dropout": 0.0,
          "EARLY_STOP": 100,
          # caser,
          "min_seq_length": 1,
          # sum
          "slots": 5,
          "cell": "SUM",
      }
      init_dict.update(flags)
      return HParams(init_dict)
  
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 5 for calling a global function with example usage: create_hparams(flags) and returns: HParams