code: def fetch_PRs(user="scikit-image", repo="scikit-image", state="open"):
      params = {"state": state, "per_page": 100, "page": 1}
  
      data = []
      page_data = True
  
      while page_data:
          config = {
              "user": user,
              "repo": repo,
              "params": urllib.urlencode(params),
          }
  
          fetch_status = (
              f"Fetching page {params['page']} (state={params['state']})"
              f" from {config['user']}/{config['repo']}..."
          )
          print(fetch_status)
  
          f = urllib.urlopen(
              f"https://api.github.com/repos/{config['user']}/{{config['repos']}}/pulls?{config['params']}"
          )
  
          params["page"] += 1
  
          page_data = json.loads(f.read())
  
          if (
              "message" in page_data
              and page_data["message"] == "Not Found"
          ):
              page_data = []
              print(
                  f"Warning: Repo not found ({config['user']}/{config['repo']})"
              )
          else:
              data.extend(page_data)
  
      return data
  
file_path: scikit-image/doc/tools/plot_pr.py
imports: import json
  import urllib
  import dateutil.parser
  from collections import OrderedDict
  from datetime import datetime, timedelta
  from dateutil.relativedelta import relativedelta
  import numpy
  import matplotlib.pyplot
  from matplotlib.ticker import FuncFormatter
  from matplotlib.transforms import blended_transform_factory
label_desc: Use image node_id 1 for calling a global function with example usage: fetch_PRs(user, repo, state) and returns: data