code: def test_load_all_multistage(tmp_dir, dvc):
      tmp_dir.gen("foo", "foo")
      stage1 = dvc.run(
          cmd="cp foo foo2",
          deps=["foo"],
          name="copy-foo-foo2",
          metrics=["foo2"],
          always_changed=True,
      )
      stages = load_file(dvc, PROJECT_FILE).stages.values()
      assert len(stages) == 1
      assert list(stages) == [stage1]
  
      tmp_dir.gen("bar", "bar")
      stage2 = dvc.run(
          cmd="cp bar bar2",
          deps=["bar"],
          name="copy-bar-bar2",
          metrics=["bar2"],
          always_changed=True,
      )
      assert set(load_file(dvc, PROJECT_FILE).stages.values()) == {
          stage2,
          stage1,
      }
  
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 6 for calling a global function with example usage: test_load_all_multistage(tmp_dir, dvc) without return types