code: def commit(
      self,
      target=None,
      with_deps=False,
      recursive=False,
      force=False,
      allow_missing=False,
      data_only=False,
      relink=True,
  ):
      stages_info = [
          info
          for info in self.stage.collect_granular(
              target, with_deps=with_deps, recursive=recursive
          )
          if not data_only or info.stage.is_data_source
      ]
      for stage_info in stages_info:
          stage = stage_info.stage
          if force:
              stage.save(allow_missing=allow_missing)
          else:
              changes = stage.changed_entries()
              if any(changes):
                  prompt_to_commit(stage, changes, force=force)
                  stage.save(allow_missing=allow_missing)
          stage.commit(
              filter_info=stage_info.filter_info,
              allow_missing=allow_missing,
              relink=relink,
          )
          stage.dump(update_pipeline=False)
      return [s.stage for s in stages_info]
  
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 3 for calling a global function with example usage: commit(target, with_deps, recursive, force, allow_missing, data_only, relink) and returns: unknown