code: def test_check_search_algorithm_dependencies_installed(
      dependencies, raises_exception
  ):
      config = {
          INPUT_FEATURES: [text_feature()],
          OUTPUT_FEATURES: [binary_feature()],
          HYPEROPT: {
              PARAMETERS: {
                  "trainer.learning_rate": {
                      "space": "choice",
                      "categories": [0.0001, 0.001, 0.01, 0.1],
                  }
              },
              SEARCH_ALG: {TYPE: "random"},
          },
      }
  
      with patch(
          "ludwig.schema.hyperopt.utils.get_search_algorithm_dependencies",
          return_value=dependencies,
      ):
          if raises_exception:
              with pytest.raises(ConfigValidationError):
                  ModelConfig.from_dict(config)
          else:
              ModelConfig.from_dict(config)
  
file_path: ludwig/tests/ludwig/config_validation/test_validate_config_hyperopt.py
imports: from itertools import repeat
  from unittest.mock import patch
  import pytest
  import ludwig.schema.hyperopt.parameter
  import ludwig.schema.hyperopt.scheduler
  import ludwig.schema.hyperopt.search_algorithm
  from ludwig.constants import EXECUTOR, HYPEROPT, INPUT_FEATURES, OUTPUT_FEATURES, PARAMETERS, SCHEDULER, SEARCH_ALG, TYPE
  from ludwig.error import ConfigValidationError
  from ludwig.schema.hyperopt import utils
  from ludwig.schema.model_types.base import ModelConfig
  from tests.integration_tests.utils import binary_feature, text_feature
label_desc: Use image node_id 2 for calling a global function with example usage: test_check_search_algorithm_dependencies_installed(dependencies, raises_exception) without return types