code: def test_plots_modify_should_not_change_lockfile(
      tmp_dir, dvc, run_copy_metrics, custom_template
  ):
      (tmp_dir / "metric_t.json").dump_json(
          [{"a": 1, "b": 2}], sort_keys=True
      )
      run_copy_metrics(
          "metric_t.json",
          "metric.json",
          plots_no_cache=["metric.json"],
          name="copy-metrics",
          single_stage=False,
      )
  
      (tmp_dir / LOCK_FILE).unlink()
      dvc.plots.modify(
          "metric.json", props={"template": relpath(custom_template)}
      )
      assert not (tmp_dir / LOCK_FILE).exists()
  
file_path: dvc/tests/func/plots/test_modify.py
imports: import pytest
  from dvc.dvcfile import LOCK_FILE
  from dvc.repo.plots import PropsNotFoundError
  from dvc.utils import relpath
  from tests.utils.plots import get_plot
label_desc: Use image node_id 2 for calling a global function with example usage: test_plots_modify_should_not_change_lockfile(tmp_dir, dvc, run_copy_metrics, custom_template) without return types