code: def release_changelog_add(obj, version):
      """Prepend the changelog with the current release"""
      repo, issue_tracker = obj["repo"], obj["issue_tracker"]
  
      # just handle the current version
      release = Release(version, repo=repo, issue_tracker=issue_tracker)
      if release.is_released:
          raise ValueError("This version has been already released!")
  
      changelog = release.changelog()
      changelog_path = pathlib.Path(repo) / "CHANGELOG.md"
  
      current_content = changelog_path.read_text()
      new_content = changelog.render("markdown") + current_content
  
      changelog_path.write_text(new_content)
      click.echo("CHANGELOG.md is updated!")
  
file_path: arrow/dev/archery/archery/release/cli.py
imports: import pathlib
  import click
  from ..utils.cli import validate_arrow_sources
  from .core import IssueTracker, Release
label_desc: Use image node_id 4 for calling a global function with example usage: release_changelog_add(obj, version) without return types