code: def main(argv: Sequence[str]) -> int:
      if len(argv) != 3:
          print("Usage: generate-gh-release-notes VERSION FILE")
          return 2
  
      version, filename = argv[1:3]
      print(f"Generating GitHub release notes for version {version}")
      rst_body = extract_changelog_entries_for(version)
      md_body = convert_rst_to_md(rst_body)
      Path(filename).write_text(md_body, encoding="UTF-8")
      print()
      print(f"Done: {filename}")
      print()
      return 0
  
file_path: pytest/scripts/generate-gh-release-notes.py
imports: import re
  import sys
  from pathlib import Path
  from typing import Sequence
  import pypandoc
label_desc: Use image node_id 3 for calling a global function with example usage: main(argv) and returns: int, int