code: def test_dvcfile_load_with_plots(tmp_dir, dvc):
      (tmp_dir / "dvc.yaml").dump(
          {
              "plots": [
                  {"path/to/plot": {"x": "value", "y": "value"}},
                  {
                      "path/to/another/plot": {
                          "x": "value",
                          "y": "value",
                      }
                  },
                  {"path/to/empty/plot": None},
                  "path/to/plot/str",
              ],
              "stages": STAGE_EXAMPLE,
          },
      )
      plots = list(dvc.plots.collect())
      top_level_plots = plots[0]["workspace"]["definitions"]["data"][
          "dvc.yaml"
      ]["data"]
      assert all(
          name in top_level_plots
          for name in ("path/to/plot", "path/to/another/plot")
      )
  
imports: import textwrap
  import pytest
  from dvc.annotations import Annotation
  from dvc.dvcfile import LOCK_FILE, PROJECT_FILE, ParametrizedDumpError, SingleStageFile, load_file
  from dvc.stage.exceptions import StageFileDoesNotExistError
  from dvc.stage.loader import StageNotFound
  from dvc.utils.strictyaml import YAMLValidationError
label_desc: Use image node_id 21 for calling a global function with example usage: test_dvcfile_load_with_plots(tmp_dir, dvc) without return types