code: def get_pull_request(project, num, github_api=3):
      """get pull request info  by number
  
      github_api : version of github api to use
      """
      if github_api == 2:
          url = "http://github.com/api/v2/json/pulls/{project}/{num}".format(
              project=project, num=num
          )
      elif github_api == 3:
          url = "https://api.github.com/repos/{project}/pulls/{num}".format(
              project=project, num=num
          )
      response = requests.get(url)
      response.raise_for_status()
      if github_api == 2:
          return json.loads(response.text)["pull"]
      return json.loads(response.text)
  
file_path: Theano/theano/misc/gh_api.py
imports: from __future__ import absolute_import, print_function, division
  import requests
  import getpass
  import json
label_desc: Use image node_id 5 for calling a global function with example usage: get_pull_request(project, num, github_api) and returns: json, json