code: def test_grid_search_more_than_one_sample():
      """Test logs a user warning indicating that duplicate trials will be created because all of the parameters in
      the search space are of type grid_search and the number of samples is greater than 1.
      """
      with pytest.warns(RuntimeWarning):
          log_warning_if_all_grid_type_parameters(
              {
                  "parameters": {
                      "trainer.learning_rate": {
                          "space": "grid_search",
                          "values": [0.001, 0.005, 0.1],
                      },
                      "defaults.text.encoder.type": {
                          "space": "grid_search",
                          "values": ["parallel_cnn", "stacked_cnn"],
                      },
                  },
                  "executor": {"num_samples": 2},
              }
          )
  
file_path: ludwig/tests/ludwig/hyperopt/test_hyperopt.py
imports: import pytest
  from ludwig.constants import INPUT_FEATURES, NAME, OUTPUT_FEATURES, TYPE
  from ludwig.hyperopt.utils import log_warning_if_all_grid_type_parameters, substitute_parameters
  from ludwig.schema.model_config import ModelConfig
label_desc: Use image node_id 3 for calling a global function with example usage: test_grid_search_more_than_one_sample() without return types