code: def test_params_order(tmp_dir, dvc):
      tmp_dir.gen(
          {
              "params.yaml": dumps_yaml({"p": 1}),
              "params1.yaml": dumps_yaml({"p1": 1}),
              "sub": {"params2.yaml": dumps_yaml({"p2": 1})},
          }
      )
  
      params_path = os.path.join("..", "params.yaml")
      p2_path = os.path.join("sub", "params2.yaml")
      dvc.stage.add(
          params=[{p2_path: ["p2"]}, {"params1.yaml": ["p1"]}],
          cmd="cmd1",
          name="stage1",
      )
      with (tmp_dir / "sub").chdir():
          dvc.stage.add(
              params=[{params_path: ["p"]}], cmd="cmd2", name="stage2"
          )
  
      # params are sorted during dumping, therefore p1 is first
      assert list(dvc.params.show()[""]["data"]) == [
          "params1.yaml",
          p2_path,
          "params.yaml",
      ]
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_params_order(tmp_dir, dvc) without return types