code: def _after_commit(session: Session) -> None:
      if not has_app_context():
          return
  
      app = current_app._get_current_object()  # type: ignore[attr-defined]
  
      if not app.config["SQLALCHEMY_TRACK_MODIFICATIONS"]:
          return
  
      if session._model_changes:
          changes = list(session._model_changes.values())
          models_committed.send(app, changes=changes)
          session._model_changes.clear()
  
file_path: flask-sqlalchemy/src/flask_sqlalchemy/track_modifications.py
imports: from __future__ import annotations
  import typing
  import sqlalchemy
  import sqlalchemy.event
  import sqlalchemy.orm
  from flask import current_app
  from flask import has_app_context
  from flask.signals import Namespace
label_desc: Use image node_id 4 for calling a global function with example usage: _after_commit(session) without return types