code: def prepare_hparams(yaml_file=None, **kwargs):
      """Prepare the model hyperparameters and check that all have the correct value.
  
      Args:
          yaml_file (str): YAML file as configuration.
  
      Returns:
          HParams: Hyperparameter object.
      """
      if yaml_file is not None:
          config = load_yaml(yaml_file)
          config = flat_config(config)
      else:
          config = {}
  
      if kwargs:
          for name, value in kwargs.items():
              config[name] = value
  
      check_nn_config(config)
      return create_hparams(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 6 for calling a global function with example usage: prepare_hparams(yaml_file) and returns: create_hparams