code: def hydra_setup(tmp_dir, config_dir, config_name):
      config_dir = tmp_dir / config_dir
      (config_dir / "db").mkdir(parents=True)
      (config_dir / f"{config_name}.yaml").dump(
          {"defaults": [{"db": "mysql"}]}
      )
      (config_dir / "db" / "mysql.yaml").dump(
          {"driver": "mysql", "user": "omry", "pass": "secret"}
      )
      (config_dir / "db" / "postgresql.yaml").dump(
          {
              "driver": "postgresql",
              "user": "foo",
              "pass": "bar",
              "timeout": 10,
          }
      )
      return str(config_dir)
  
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 3 for calling a global function with example usage: hydra_setup(tmp_dir, config_dir, config_name) and returns: str