code: def test_hydra_sweep(
      tmp_dir,
      params_repo,
      dvc,
      mocker,
      hydra_enabled,
      overrides,
      expected,
  ):
      patched = mocker.patch.object(dvc.experiments, "queue_one")
  
      if hydra_enabled:
          hydra_setup(
              tmp_dir,
              config_dir="conf",
              config_name="config",
          )
          with dvc.config.edit() as conf:
              conf["hydra"]["enabled"] = True
  
      dvc.experiments.run(params=overrides, queue=True)
  
      assert patched.call_count == len(expected)
      for e in expected:
          patched.assert_any_call(
              mocker.ANY,
              params=e,
              targets=None,
              copy_paths=None,
              message=None,
          )
  
file_path: dvc/tests/func/experiments/test_set_params.py
imports: import pytest
  from dvc.exceptions import InvalidArgumentError
  from tests.func.utils.test_hydra import hydra_setup
label_desc: Use image node_id 3 for calling a global function with example usage: test_hydra_sweep(tmp_dir, params_repo, dvc, mocker, hydra_enabled, overrides, expected) without return types