code: def prompt_to_commit(stage, changes, force=False):
      from dvc.stage.exceptions import StageCommitError
  
      if not (
          force or prompt.confirm(_prepare_message(stage, changes))
      ):
          raise StageCommitError(
              f"unable to commit changed {stage}. Use `-f|--force` to force."
          )
  
file_path: dvc/dvc/repo/commit.py
imports: from typing import TYPE_CHECKING, Set
  from dvc import prompt
  from .None import locked
  from .scm_context import scm_context
label_desc: Use image node_id 2 for calling a global function with example usage: prompt_to_commit(stage, changes, force) without return types