code: def update_release_notes(version, new_lines):
      release_notes_path = os.path.join(
          GMAPS_DIR, "docs", "source", "release_notes.rst"
      )
      with open(release_notes_path) as f:
          current_release_notes_lines = f.readlines()
      current_release_notes_lines = itertools.dropwhile(
          lambda line: "Version" not in line,
          current_release_notes_lines,
      )
      new_release_notes_lines = (
          ["\n", "Release notes\n", "-------------\n", "\n"]
          + new_lines
          + list(current_release_notes_lines)
      )
      with open(release_notes_path, "w") as f:
          f.writelines(new_release_notes_lines)
  
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 5 for calling a global function with example usage: update_release_notes(version, new_lines) without return types