code: def test_apply_overrides(tmp_dir, suffix, overrides, expected):
      from dvc.utils.hydra import apply_overrides
  
      if suffix == "toml" and overrides in [
          ["foo=baz"],
          ["foo.0=bar"],
          ["foo=baz", "goo=bar"],
          ["lorem=null"],
      ]:
          pytest.skip(
              "TOML dumper breaks when overriding a list/dict with other type or"
              " when handling `null` values."
          )
  
      params_file = tmp_dir / f"params.{suffix}"
      params_file.dump(
          {
              "foo": [{"bar": 1}, {"baz": 2}],
              "goo": {"bag": 3.0},
              "lorem": False,
          }
      )
      apply_overrides(path=params_file.name, overrides=overrides)
      assert params_file.parse() == expected
  
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 1 for calling a global function with example usage: test_apply_overrides(tmp_dir, suffix, overrides, expected) without return types