code: def prepare_release_pr(
      base_branch: str, is_major: bool, token: str, prerelease: str
  ) -> None:
      print()
      print(f"Processing release for branch {Fore.CYAN}{base_branch}")
  
      check_call(["git", "checkout", f"origin/{base_branch}"])
  
      changelog = Path("changelog")
  
      features = list(changelog.glob("*.feature.rst"))
      breaking = list(changelog.glob("*.breaking.rst"))
      is_feature_release = bool(features or breaking)
  
      try:
          version = find_next_version(
              base_branch, is_major, is_feature_release, prerelease
          )
      except InvalidFeatureRelease as e:
          print(f"{Fore.RED}{e}")
          raise SystemExit(1)
  
      print(f"Version: {Fore.CYAN}{version}")
  
      release_branch = f"release-{version}"
  
      run(
          ["git", "config", "user.name", "pytest bot"],
          check=True,
      )
      run(
          ["git", "config", "user.email", "pytestbot@gmail.com"],
          check=True,
      )
  
      run(
          [
              "git",
              "checkout",
              "-b",
              release_branch,
              f"origin/{base_branch}",
          ],
          check=True,
      )
  
      print(f"Branch {Fore.CYAN}{release_branch}{Fore.RESET} created.")
  
      if is_major:
          template_name = "release.major.rst"
      elif prerelease:
          template_name = "release.pre.rst"
      elif is_feature_release:
          template_name = "release.minor.rst"
      else:
          template_name = "release.patch.rst"
  
      # important to use tox here because we have changed branches, so dependencies
      # might have changed as well
      cmdline = [
          "tox",
          "-e",
          "release",
          "--",
          version,
          template_name,
          release_branch,  # doc_version
          "--skip-check-links",
      ]
      print("Running", " ".join(cmdline))
      run(
          cmdline,
          check=True,
      )
  
      oauth_url = f"https://{token}:x-oauth-basic@github.com/{SLUG}.git"
      run(
          [
              "git",
              "push",
              oauth_url,
              f"HEAD:{release_branch}",
              "--force",
          ],
          check=True,
      )
      print(f"Branch {Fore.CYAN}{release_branch}{Fore.RESET} pushed.")
  
      body = PR_BODY.format(version=version)
      repo = login(token)
      pr = repo.create_pull(
          f"Prepare release {version}",
          base=base_branch,
          head=release_branch,
          body=body,
      )
      print(f"Pull request {Fore.CYAN}{pr.url}{Fore.RESET} created.")
  
file_path: pytest/scripts/prepare-release-pr.py
imports: import argparse
  import re
  from pathlib import Path
  from subprocess import check_call
  from subprocess import check_output
  from subprocess import run
  from colorama import Fore
  from colorama import init
  from github3.repos import Repository
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_release_pr(base_branch, is_major, token, prerelease) without return types