code: def get_pull_requests(repo, revision_range):
      prnums = []
  
      # From regular merges
      merges = this_repo.git.log(
          "--oneline", "--merges", revision_range
      )
      issues = re.findall(r"Merge pull request \#(\d*)", merges)
      prnums.extend(int(s) for s in issues)
  
      # From Homu merges (Auto merges)
      issues = re.findall(r"Auto merge of \#(\d*)", merges)
      prnums.extend(int(s) for s in issues)
  
      # From fast forward squash-merges
      commits = this_repo.git.log(
          "--oneline", "--no-merges", "--first-parent", revision_range
      )
      issues = re.findall(r"^.*\((\#|gh-|gh-\#)(\d+)\)$", commits, re.M)
      prnums.extend(int(s[1]) for s in issues)
  
      # get PR data from github repo
      prnums.sort()
      prs = [repo.get_pull(n) for n in prnums]
      return prs
  
file_path: numpy/tools/changelog.py
imports: import os
  import sys
  import re
  from git import Repo
  from github import Github
label_desc: Use image node_id 2 for calling a global function with example usage: get_pull_requests(repo, revision_range) and returns: prs