code: def test_load_unicode_error(tmp_dir, dvc, mocker):
      config = Config.from_cwd(validate=False)
      mocker.patch(
          "configobj.ConfigObj",
          side_effect=UnicodeDecodeError("", b"", 0, 0, ""),
      )
      with pytest.raises(ConfigError):
          with config.edit():
              pass
  
file_path: dvc/tests/unit/test_config.py
imports: import logging
  import os
  import textwrap
  import pytest
  from dvc.config import Config, ConfigError
  from dvc.fs import LocalFileSystem
label_desc: Use image node_id 6 for calling a global function with example usage: test_load_unicode_error(tmp_dir, dvc, mocker) without return types