code: def test_dkn_item2item_component_definition(dkn_files):
      # Load params from fixture
      (
          data_path,
          yaml_file,
          news_feature_file,
          _,
          wordEmb_file,
          entityEmb_file,
          contextEmb_file,
      ) = dkn_files
  
      # Test DKN's item2item version
      hparams = prepare_hparams(
          yaml_file,
          news_feature_file=news_feature_file,
          wordEmb_file=wordEmb_file,
          entityEmb_file=entityEmb_file,
          contextEmb_file=contextEmb_file,
          epochs=1,
          is_clip_norm=True,
          max_grad_norm=0.5,
          his_size=20,
          MODEL_DIR=os.path.join(data_path, "save_models"),
          use_entity=True,
          use_context=True,
      )
  
      hparams.neg_num = 9
      model_item2item = DKNItem2Item(hparams, DKNItem2itemTextIterator)
      assert model_item2item.pred_logits is not None
      assert model_item2item.update is not None
      assert model_item2item.iterator is not None
      assert model_item2item.hparams is not None
      assert model_item2item.hparams.model_type == "dkn"
      assert model_item2item.hparams.epochs == 1
      assert model_item2item.hparams.batch_size == 100
      assert model_item2item.hparams.learning_rate == 0.0005
      assert model_item2item.hparams.loss == "log_loss"
      assert model_item2item.hparams.optimizer == "adam"
      assert model_item2item.hparams.max_grad_norm == 0.5
      assert model_item2item.hparams.his_size == 20
  
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 5 for calling a global function with example usage: test_dkn_item2item_component_definition(dkn_files) without return types