code: def test_stage_dump_no_outs_deps(tmp_dir, dvc):
      stage = PipelineStage(
          name="s1", repo=dvc, path="path", cmd="command"
      )
      lockfile = Lockfile(dvc, "path.lock")
      lockfile.dump(stage)
      assert lockfile.load() == {
          "schema": "2.0",
          "stages": {"s1": {"cmd": "command"}},
      }
  
file_path: dvc/tests/unit/test_lockfile.py
imports: import pytest
  from dvc.dvcfile import FileIsGitIgnored, Lockfile
  from dvc.stage import PipelineStage
  from dvc.utils.strictyaml import YAMLValidationError
label_desc: Use image node_id 1 for calling a global function with example usage: test_stage_dump_no_outs_deps(tmp_dir, dvc) without return types