code: def test_match_renderers(M):
      data = {
          "v1": {
              "definitions": {
                  "data": {
                      "config_file_1": {
                          "data": {
                              "plot_id_1": {
                                  "x": "x",
                                  "y": {"file.json": "y"},
                              }
                          }
                      }
                  },
              },
              "sources": {
                  "data": {
                      "file.json": {
                          "data": [{"x": 1, "y": 1}, {"x": 2, "y": 2}]
                      }
                  }
              },
          },
          "revision_with_no_data": {
              "definitions": {
                  "data": {
                      "config_file_1": {
                          "data": {
                              "plot_id_1": {
                                  "x": "x",
                                  "y": {"file.json": "y"},
                              }
                          }
                      }
                  },
              },
              "sources": {
                  "data": {"file.json": {"error": FileNotFoundError()}}
              },
          },
      }
  
      (renderer_with_errors,) = match_defs_renderers(data)
      renderer = renderer_with_errors[0]
      assert renderer.datapoints == [
          {
              REVISION: "v1",
              FILENAME: "file.json",
              FIELD: "y",
              "x": 1,
              "y": 1,
          },
          {
              REVISION: "v1",
              FILENAME: "file.json",
              FIELD: "y",
              "x": 2,
              "y": 2,
          },
      ]
      assert renderer.properties == {
          "anchors_y_definitions": [
              {FILENAME: "file.json", FIELD: "y"}
          ],
          "revs_with_datapoints": ["v1"],
          "title": "plot_id_1",
          "x": "x",
          "y": "y",
          "x_label": "x",
          "y_label": "y",
      }
      assert renderer_with_errors.source_errors == {
          "revision_with_no_data": {
              "file.json": M.instance_of(FileNotFoundError)
          }
      }
      assert not renderer_with_errors.definition_errors
  
file_path: dvc/tests/unit/render/test_match.py
imports: import pytest
  from funcy import set_in
  from dvc.render import FIELD, FILENAME, REVISION
  from dvc.render.converter.vega import VegaConverter
  from dvc.render.match import PlotsData, _squash_plots_properties, match_defs_renderers
label_desc: Use image node_id 2 for calling a global function with example usage: test_match_renderers(M) without return types