code: def test_cmd_changes_other_orders_are_preserved(
      tmp_dir, dvc, run_head
  ):
      tmp_dir.gen(FS_STRUCTURE)
      deps = ["foo", "bar", "foobar"]
      stage = run_head(*deps, name="copy-first-line")
  
      initial_content = read_lock_file()
      # let's change cmd in pipeline file
      # it should only change "cmd", otherwise it should be
      # structurally same as cmd
      new_cmd = "python head.py foo bar foobar"
      assert stage.cmd != new_cmd  # sanity check
      stage.cmd = new_cmd
      stage.dvcfile._dump_pipeline_file(stage)
  
      initial_content["stages"]["copy-first-line"]["cmd"] = stage.cmd
  
      assert dvc.reproduce(stage.addressing) == [stage]
  
      new_lock_content = read_lock_file()
      assert_eq_lockfile(new_lock_content, initial_content)
  
file_path: dvc/tests/func/test_lockfile.py
imports: from collections import OrderedDict
  from operator import itemgetter
  from dvc.dvcfile import LOCK_FILE
  from dvc.stage.utils import split_params_deps
  from dvc.utils.fs import remove
  from dvc.utils.serialize import dumps_yaml, parse_yaml_for_update
  from tests.func.test_run import supported_params
label_desc: Use image node_id 5 for calling a global function with example usage: test_cmd_changes_other_orders_are_preserved(tmp_dir, dvc, run_head) without return types