code: def test_compose_and_dump_yaml_handles_string(tmp_dir):
      """Regression test for https://github.com/iterative/dvc/issues/8583"""
      from dvc.utils.hydra import compose_and_dump
  
      config = tmp_dir / "conf" / "config.yaml"
      config.parent.mkdir()
      config.write_text("foo: 'no'\n")
      output_file = tmp_dir / "params.yaml"
      compose_and_dump(
          output_file, str(config.parent), None, "config", []
      )
      assert output_file.read_text() == "foo: 'no'\n"
  
file_path: dvc/tests/func/utils/test_hydra.py
imports: from contextlib import nullcontext
  import pytest
  from dvc.exceptions import InvalidArgumentError
label_desc: Use image node_id 7 for calling a global function with example usage: test_compose_and_dump_yaml_handles_string(tmp_dir) without return types