code: def test_plots_show_vega(dvc, mocker, plots_data):
      cli_args = parse_args(
          [
              "plots",
              "show",
              "-o",
              "result.extension",
              "-t",
              "template",
              "--show-vega",
              "--no-header",
              "datafile",
          ]
      )
      assert cli_args.func == CmdPlotsShow
  
      cmd = cli_args.func(cli_args)
  
      m = mocker.patch(
          "dvc.repo.plots.Plots.show",
          return_value=plots_data,
      )
      render_mock = mocker.patch(
          "dvc_render.render_html", return_value="html_path"
      )
  
      assert cmd.run() == 0
  
      m.assert_called_once_with(
          targets=["datafile"],
          props={"template": "template", "header": False},
      )
      render_mock.assert_not_called()
  
imports: import json
  import os
  import posixpath
  from pathlib import Path
  import pytest
  from funcy import set_in
  from dvc.cli import parse_args
  from dvc.commands.plots import CmdPlotsDiff, CmdPlotsShow, CmdPlotsTemplates
  from dvc.render.match import RendererWithErrors
  from dvc.utils.serialize import YAMLFileCorruptedError
label_desc: Use image node_id 3 for calling a global function with example usage: test_plots_show_vega(dvc, mocker, plots_data) without return types