code: def test_metrics_show(dvc, mocker):
      cli_args = parse_args(
          [
              "metrics",
              "show",
              "--all-tags",
              "--all-branches",
              "--all-commits",
              "target1",
              "target2",
              "--precision",
              "8",
          ]
      )
      assert cli_args.func == CmdMetricsShow
  
      cmd = cli_args.func(cli_args)
      m1 = mocker.patch("dvc.repo.metrics.show.show", return_value={})
      m2 = mocker.patch("dvc.compare.show_metrics", return_value="")
  
      assert cmd.run() == 0
  
      m1.assert_called_once_with(
          cmd.repo,
          ["target1", "target2"],
          all_tags=True,
          all_branches=True,
          all_commits=True,
      )
      m2.assert_called_once_with(
          {},
          markdown=False,
          all_tags=True,
          all_branches=True,
          all_commits=True,
          precision=8,
          round_digits=True,
      )
  
imports: import json
  from dvc.cli import parse_args
  from dvc.commands.metrics import CmdMetricsDiff, CmdMetricsShow
label_desc: Use image node_id 3 for calling a global function with example usage: test_metrics_show(dvc, mocker) without return types