code: def test_plots_binary(
      tmp_dir, scm, dvc, run_copy_metrics, custom_template, ext
  ):
      file1 = f"image.{ext}"
      file2 = f"plot.{ext}"
      with open(file1, "wb") as fd:
          fd.write(b"content")
  
      dvc.add([file1])
      run_copy_metrics(
          file1,
          file2,
          commit="run training",
          plots=[file2],
          name="s2",
          single_stage=False,
      )
  
      scm.add(["dvc.yaml", "dvc.lock"])
      scm.commit("initial")
  
      scm.tag("v1")
  
      with open(file2, "wb") as fd:
          fd.write(b"content2")
  
      result = dvc.plots.show(revs=["v1", "workspace"])
      assert get_plot(result, "v1", file=file2) == b"content"
      assert get_plot(result, "workspace", file=file2) == b"content2"
  
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 12 for calling a global function with example usage: test_plots_binary(tmp_dir, scm, dvc, run_copy_metrics, custom_template, ext) without return types