code: def test_show_branch(tmp_dir, scm, dvc, run_copy_metrics):
      tmp_dir.gen("metrics_temp.yaml", "foo: 1")
      run_copy_metrics(
          "metrics_temp.yaml",
          "metrics.yaml",
          name="copy-metrics",
          metrics_no_cache=["metrics.yaml"],
      )
      scm.add(["metrics.yaml", "metrics.yaml.dvc"])
      scm.commit("init")
  
      with tmp_dir.branch("branch", new=True):
          tmp_dir.scm_gen("metrics.yaml", "foo: 2", commit="branch")
  
      assert dvc.metrics.show(revs=["branch"]) == {
          "workspace": {"data": {"metrics.yaml": {"data": {"foo": 1}}}},
          "branch": {"data": {"metrics.yaml": {"data": {"foo": 2}}}},
      }
  
imports: import json
  import os
  from os.path import join
  import pytest
  from funcy import get_in
  from dvc.cli import main
  from dvc.dvcfile import PROJECT_FILE
  from dvc.exceptions import OverlappingOutputPathsError
  from dvc.repo import Repo
  from dvc.utils.fs import remove
  from dvc.utils.serialize import JSONFileCorruptedError
label_desc: Use image node_id 7 for calling a global function with example usage: test_show_branch(tmp_dir, scm, dvc, run_copy_metrics) without return types