code: def test_lock_params_file_sorted(dvc):
      stage = create_stage(
          PipelineStage,
          dvc,
          params=[
              "lorem.ipsum",
              "abc",
              {"myparams.yaml": ["foo", "foobar"]},
              {"a-params-file.yaml": ["bar", "barr"]},
          ],
          **kwargs,
      )
      stage.deps[0].hash_info = HashInfo(
          "params",
          {"lorem.ipsum": {"lorem1": 1, "lorem2": 2}, "abc": 3},
      )
      stage.deps[1].hash_info = HashInfo(
          "params", {"foo": ["f", "o", "o"], "foobar": "foobar"}
      )
      stage.deps[2].hash_info = HashInfo(
          "params", {"bar": ["b", "a", "r"], "barr": "barr"}
      )
      assert to_single_stage_lockfile(stage)["params"] == OrderedDict(
          [
              (
                  DEFAULT_PARAMS_FILE,
                  OrderedDict(
                      [
                          ("abc", 3),
                          ("lorem.ipsum", {"lorem1": 1, "lorem2": 2}),
                      ]
                  ),
              ),
              (
                  "a-params-file.yaml",
                  OrderedDict(
                      [("bar", ["b", "a", "r"]), ("barr", "barr")]
                  ),
              ),
              (
                  "myparams.yaml",
                  OrderedDict(
                      [("foo", ["f", "o", "o"]), ("foobar", "foobar")]
                  ),
              ),
          ]
      )
  
imports: from collections import OrderedDict
  import pytest
  from voluptuous import Schema
  from dvc.dvcfile import PROJECT_FILE
  from dvc.schema import LOCK_FILE_STAGE_SCHEMA, LOCKFILE_STAGES_SCHEMA
  from dvc.stage import PipelineStage, create_stage
  from dvc.stage.serialize import DEFAULT_PARAMS_FILE, to_lockfile
  from dvc.stage.serialize import to_single_stage_lockfile
  from dvc.stage.utils import split_params_deps
  from dvc_data.hashfile.hash_info import HashInfo
label_desc: Use image node_id 6 for calling a global function with example usage: test_lock_params_file_sorted(dvc) without return types