code: def test_xdeepfm_component_definition(deeprec_resource_path):
      data_path = os.path.join(deeprec_resource_path, "xdeepfm")
      yaml_file = os.path.join(data_path, "xDeepFM.yaml")
  
      if not os.path.exists(yaml_file):
          download_deeprec_resources(
              "https://recodatasets.z20.web.core.windows.net/deeprec/",
              data_path,
              "xdeepfmresources.zip",
          )
  
      hparams = prepare_hparams(yaml_file)
      model = XDeepFMModel(hparams, FFMTextIterator)
  
      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 == "xDeepFM"
      assert model.hparams.epochs == 50
      assert model.hparams.batch_size == 128
      assert model.hparams.learning_rate == 0.0005
      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 3 for calling a global function with example usage: test_xdeepfm_component_definition(deeprec_resource_path) without return types