code: def test_params_error(dvc, params, errmsg):
      with pytest.raises(ValueError, match=errmsg):
          loads_params(Stage(dvc), params)
  
imports: import pytest
  from dvc.dependency import ParamsDependency, loadd_from, loads_params
  from dvc.dependency.param import BadParamFileError, MissingParamsError
  from dvc.stage import Stage
  from dvc.utils.serialize import dump_toml, dump_yaml, load_yaml
label_desc: Use image node_id 3 for calling a global function with example usage: test_params_error(dvc, params, errmsg) without return types