code: def test_missing_cache(tmp_dir, dvc, run_copy_metrics):
      tmp_dir.gen("metrics_t.yaml", "1.1")
      run_copy_metrics(
          "metrics_t.yaml",
          "metrics.yaml",
          name="copy-metrics",
          metrics=["metrics.yaml"],
      )
  
      # This one should be skipped
      stage = run_copy_metrics(
          "metrics_t.yaml",
          "metrics2.yaml",
          name="copy-metrics2",
          metrics=["metrics2.yaml"],
      )
      remove(stage.outs[0].fspath)
      remove(stage.outs[0].cache_path)
  
      result = dvc.metrics.show()
      metrics2 = result[""]["data"].pop("metrics2.yaml")
      assert isinstance(metrics2["error"], FileNotFoundError)
      assert result == {
          "": {
              "data": {
                  "metrics.yaml": {"data": 1.1},
              }
          }
      }
  
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 9 for calling a global function with example usage: test_missing_cache(tmp_dir, dvc, run_copy_metrics) without return types