code: def test_metrics_show_rev_with_metrics(metrics_repo):
      train_metrics_file, test_metrics_file = metrics_repo
      assert api.metrics_show(rev="HEAD~1") == TRAIN_METRICS[0]
      assert api.metrics_show(rev="HEAD") == {
          f"{train_metrics_file}:avg_prec": TRAIN_METRICS[0][
              "avg_prec"
          ],
          f"{train_metrics_file}:roc_auc": TRAIN_METRICS[0]["roc_auc"],
          f"{test_metrics_file}:avg_prec": TEST_METRICS[0]["avg_prec"],
          f"{test_metrics_file}:roc_auc": TEST_METRICS[0]["roc_auc"],
      }
      assert api.metrics_show(rev="better-model~1") == {
          f"{train_metrics_file}:avg_prec": TRAIN_METRICS[1][
              "avg_prec"
          ],
          f"{train_metrics_file}:roc_auc": TRAIN_METRICS[1]["roc_auc"],
          f"{test_metrics_file}:avg_prec": TEST_METRICS[0]["avg_prec"],
          f"{test_metrics_file}:roc_auc": TEST_METRICS[0]["roc_auc"],
      }
      assert api.metrics_show(rev="better-model") == {
          f"{train_metrics_file}:avg_prec": TRAIN_METRICS[1][
              "avg_prec"
          ],
          f"{train_metrics_file}:roc_auc": TRAIN_METRICS[1]["roc_auc"],
          f"{test_metrics_file}:avg_prec": TEST_METRICS[1]["avg_prec"],
          f"{test_metrics_file}:roc_auc": TEST_METRICS[1]["roc_auc"],
      }
  
imports: import json
  import os
  from textwrap import dedent
  from typing import Dict, List
  import pytest
  from dvc import api
label_desc: Use image node_id 18 for calling a global function with example usage: test_metrics_show_rev_with_metrics(metrics_repo) without return types