code: def release(ctx, version):
      """
      Release a new version
  
      Running this task will:
       - Prompt the user for a changelog and write it to
         the release notes
       - Commit the release notes
       - Bump the version number
       - Push a release to pypi and npm
      """
      release_notes_lines = get_release_notes(version)
  
      if release_notes_lines is None:
          print("No release notes: exiting")
          exit()
  
      update_release_notes(version, release_notes_lines)
      with open("changelog.tmp", "w") as f:
          f.writelines(release_notes_lines)
  
      run("git add docs/source/release_notes.rst")
      run(
          'git commit -m "Add release notes for version {}"'.format(
              version
          )
      )
      set_pyversion(version)
      set_jsversion(version)
      release_python_sdist()
      os.chdir(os.path.join(GMAPS_DIR, "js"))
      try:
          run("npm publish")
      finally:
          os.chdir(GMAPS_DIR)
  
imports: import os
  import tempfile
  import itertools
  import shutil
  import re
  from invoke import task, run
  from subprocess import call
  import semver
label_desc: Use image node_id 2 for calling a global function with example usage: release(ctx, version) without return types