code: def test_show_from_subdir(tmp_dir, dvc, capsys):
      subdir = tmp_dir / "subdir"
  
      subdir.mkdir()
      metric = [
          {"first_val": 100, "val": 2},
          {"first_val": 200, "val": 3},
      ]
      (subdir / "metric.json").dump_json(metric, sort_keys=True)
  
      with subdir.chdir():
          assert main(["plots", "show", "metric.json"]) == 0
  
      out, _ = capsys.readouterr()
      assert subdir.as_uri() in out
      assert (subdir / "dvc_plots").is_dir()
      assert (subdir / "dvc_plots" / "index.html").is_file()
  
imports: import json
  import os
  import pytest
  from dvc.cli import main
  from dvc.dvcfile import PROJECT_FILE
  from dvc.exceptions import OverlappingOutputPathsError
  from dvc.repo import Repo
  from dvc.repo.plots import PlotMetricTypeError, onerror_collect
  from dvc.utils.fs import remove
  from dvc.utils.serialize import EncodingError, YAMLFileCorruptedError, modify_yaml
  from tests.utils.plots import get_plot
label_desc: Use image node_id 6 for calling a global function with example usage: test_show_from_subdir(tmp_dir, dvc, capsys) without return types