code: def _bump(session, *, version, file, kind):
      session.log(f"Bump version to {version!r}")
      contents = file.read_text()
      new_contents = re.sub(
          '__version__ = "(.+)"', f'__version__ = "{version}"', contents
      )
      file.write_text(new_contents)
  
      session.log("git commit")
      subprocess.run(["git", "add", str(file)])
      subprocess.run(["git", "commit", "-m", f"Bump for {kind}"])
  
imports: import contextlib
  import datetime
  import difflib
  import glob
  import os
  import re
  import shutil
  import subprocess
  import sys
  import tempfile
  import textwrap
  import time
  import webbrowser
  from pathlib import Path
  import nox
label_desc: Use image node_id 8 for calling a global function with example usage: _bump(session) without return types