code: def test_commit_pipeline_stage(tmp_dir, dvc, run_copy):
      tmp_dir.gen("foo", "foo")
      stage = run_copy(
          "foo", "bar", no_commit=True, name="copy-foo-bar"
      )
      assert dvc.status(stage.addressing)
      assert dvc.commit(stage.addressing, force=True) == [stage]
      assert not dvc.status(stage.addressing)
  
      # just to confirm different variants work
      assert dvc.commit(f":{stage.addressing}") == [stage]
      assert dvc.commit(f"{PROJECT_FILE}:{stage.addressing}") == [stage]
      assert dvc.commit(PROJECT_FILE) == [stage]
  
imports: import os
  import textwrap
  import pytest
  from dvc.dependency.base import DependencyDoesNotExistError
  from dvc.dvcfile import PROJECT_FILE
  from dvc.fs import localfs
  from dvc.output import OutputDoesNotExistError
  from dvc.stage.exceptions import StageCommitError
label_desc: Use image node_id 13 for calling a global function with example usage: test_commit_pipeline_stage(tmp_dir, dvc, run_copy) without return types