code: def test_deps_outs_getters(tmp_dir, dvc, run_copy_metrics):
      (foo_stage,) = tmp_dir.dvc_gen({"foo": "foo"})
      tmp_dir.gen({"params.yaml": "param: 100\n"})
      tmp_dir.gen({"m_temp.yaml": str(5)})
  
      run_stage1 = run_copy_metrics(
          "m_temp.yaml",
          "m.yaml",
          metrics=["m.yaml"],
          params=["param"],
          name="copy-metrics",
      )
      (tmp_dir / "metric_t.json").dump_json(
          [{"a": 1, "b": 2}, {"a": 2, "b": 3}], sort_keys=True
      )
      run_stage2 = run_copy_metrics(
          "metric_t.json",
          "metric.json",
          plots_no_cache=["metric.json"],
          name="copy-metrics2",
      )
  
      index = Index.from_repo(dvc)
  
      stages = [foo_stage, run_stage1, run_stage2]
      (metrics,) = run_stage1.outs
      _, params = run_stage1.deps
      (plots,) = run_stage2.outs
  
      expected_outs = chain.from_iterable(
          [stage.outs for stage in stages]
      )
      expected_deps = chain.from_iterable(
          [stage.deps for stage in stages]
      )
  
      assert outputs_equal(index.outs, expected_outs)
      assert outputs_equal(index.deps, expected_deps)
      assert outputs_equal(index.decorated_outs, [metrics, plots])
      assert outputs_equal(index.metrics, [metrics])
      assert outputs_equal(index.plots, [plots])
      assert outputs_equal(index.params, [params])
  
imports: import os
  from itertools import chain
  import pytest
  from pygtrie import Trie
  from dvc.repo.index import Index
  from dvc.stage import Stage
label_desc: Use image node_id 4 for calling a global function with example usage: test_deps_outs_getters(tmp_dir, dvc, run_copy_metrics) without return types