code: def test_list():
      lst = [
          {
              Output.PARAM_PATH: "foo",
              LocalFileSystem.PARAM_CHECKSUM: "123",
          },
          {
              Output.PARAM_PATH: "bar",
              LocalFileSystem.PARAM_CHECKSUM: None,
          },
          {Output.PARAM_PATH: "baz"},
      ]
      d = {Stage.PARAM_DEPS: lst}
      SingleStageFile.validate(d)
  
      lst[0][Output.PARAM_CACHE] = True
      lst[1][Output.PARAM_CACHE] = False
      d = {Stage.PARAM_OUTS: lst}
      SingleStageFile.validate(d)
  
imports: import os
  import pytest
  from dvc.annotations import Annotation
  from dvc.dvcfile import SingleStageFile
  from dvc.exceptions import OutputDuplicationError
  from dvc.fs import LocalFileSystem
  from dvc.output import Output
  from dvc.repo import Repo
  from dvc.stage import PipelineStage, Stage
  from dvc.stage.utils import compute_md5
  from dvc.utils import dict_md5
  from dvc.utils.serialize import dump_yaml, load_yaml
  from dvc.utils.strictyaml import YAMLValidationError
label_desc: Use image node_id 6 for calling a global function with example usage: test_list() without return types