code: def test_dkn_component_definition(dkn_files):
      # Load params from fixture
      (
          _,
          yaml_file,
          news_feature_file,
          user_history_file,
          wordEmb_file,
          entityEmb_file,
          contextEmb_file,
      ) = dkn_files
  
      # Test DKN model
      hparams = prepare_hparams(
          yaml_file,
          news_feature_file=news_feature_file,
          user_history_file=user_history_file,
          wordEmb_file=wordEmb_file,
          entityEmb_file=entityEmb_file,
          contextEmb_file=contextEmb_file,
          epochs=1,
          learning_rate=0.0001,
      )
  
      model = DKN(hparams, DKNTextIterator)
      assert model.logit is not None
      assert model.update is not None
      assert model.iterator is not None
      assert model.hparams is not None
      assert model.hparams.model_type == "dkn"
      assert model.hparams.epochs == 1
      assert model.hparams.batch_size == 100
      assert model.hparams.learning_rate == 0.0001
      assert model.hparams.loss == "log_loss"
      assert model.hparams.optimizer == "adam"
  
file_path: recommenders/tests/unit/recommenders/models/test_deeprec_model.py
imports: import os
  import pytest
  from recommenders.datasets import movielens
  from recommenders.datasets.amazon_reviews import download_and_extract, data_preprocessing
  from recommenders.datasets.python_splitters import python_stratified_split
label_desc: Use image node_id 4 for calling a global function with example usage: test_dkn_component_definition(dkn_files) without return types