code: def _changelog_update_unreleased_title(version, *, file):
      """Update an "*unreleased*" heading to "{version} - {date}" """
      yyyy_mm_dd = datetime.datetime.today().strftime("%Y-%m-%d")
      title = f"{version} - {yyyy_mm_dd}"
  
      with _replace_file(file) as (original, replacement):
          for line in original:
              if line == "*unreleased*\n":
                  replacement.write(f"{title}\n")
                  replacement.write(len(title) * "~" + "\n")
                  # Skip processing the next line (the heading underline for *unreleased*)
                  # since we already wrote the heading underline.
                  next(original)
              else:
                  replacement.write(line)
  
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 10 for calling a global function with example usage: _changelog_update_unreleased_title(version) without return types