code: def verify_vega_props(plot_id, json_result, title, x, y, **kwargs):
      data = json_result[plot_id]
      assert len(data) == 1
      data = first(data)
  
      assert dpath.get(data, ["content", "title"]) == title
  
      try:
          # TODO confusion_matrix_plot - need to find better way of asserting
          #      encoding as its place is not constant in vega
          plot_x = dpath.get(
              data, ["content", "spec", "encoding", "x", "field"]
          )
          plot_y = dpath.get(
              data, ["content", "spec", "encoding", "y", "field"]
          )
      except KeyError:
          # default plot
          plot_x = dpath.get(
              data, ["content", "layer", 0, "encoding", "x", "field"]
          )
          plot_y = dpath.get(
              data, ["content", "layer", 0, "encoding", "y", "field"]
          )
  
      assert plot_x == x
      assert plot_y == y
  
imports: import json
  import os
  from copy import deepcopy
  from typing import Dict, List
  from urllib.parse import urlparse
  from urllib.request import url2pathname
  import dpath
  import pytest
  from bs4 import BeautifulSoup
  from funcy import first
  from dvc.cli import main
  from dvc.render import ANCHOR_DEFINITIONS, FILENAME, REVISION
label_desc: Use image node_id 7 for calling a global function with example usage: verify_vega_props(plot_id, json_result, title, x, y) without return types