code: def test_ignore_parsing_error(tmp_dir, dvc, run_copy_metrics):
      with open("file", "wb", encoding=None) as fobj:
          fobj.write(b"\xc1")
  
      run_copy_metrics(
          "file",
          "plot_file.json",
          plots=["plot_file.json"],
          name="copy-metric",
      )
      result = dvc.plots.show(onerror=onerror_collect)
  
      assert isinstance(
          get_plot(
              result, "workspace", file="plot_file.json", endkey="error"
          ),
          EncodingError,
      )
  
imports: import json
  import os
  import pytest
  from dvc.cli import main
  from dvc.dvcfile import PROJECT_FILE
  from dvc.exceptions import OverlappingOutputPathsError
  from dvc.repo import Repo
  from dvc.repo.plots import PlotMetricTypeError, onerror_collect
  from dvc.utils.fs import remove
  from dvc.utils.serialize import EncodingError, YAMLFileCorruptedError, modify_yaml
  from tests.utils.plots import get_plot
label_desc: Use image node_id 10 for calling a global function with example usage: test_ignore_parsing_error(tmp_dir, dvc, run_copy_metrics) without return types