code: def get_pr_info(
      pr_number: int,
      repo_name: str = "wandb/wandb",
      get_diff: bool = True,
  ) -> Tuple[str, Optional[str]]:
      """Get the title and diff of a PR."""
      g = Github(GITHUB_TOKEN)
      repo = g.get_repo(repo_name)
  
      # Get specific pull request by number
      pr = repo.get_pull(pr_number)
  
      if not get_diff:
          return pr.title, None
  
      # Get the files
      files = pr.get_files()
  
      diff = "\n".join(
          [
              file.patch
              or file.filename  # use filename if patch is empty
              for file in files
              if "_pb2"
              not in file.filename  # ignore autogenerated protobuf files
          ]
      )
      pr_title = pr.title
  
      return pr_title, diff
  
file_path: wandb/tools/pr-title-bot.py
imports: import argparse
  import os
  import sys
  from typing import Optional, Tuple
  from github import Github
  from openai import OpenAI
  from tenacity import retry, stop_after_attempt, wait_random_exponential
label_desc: Use image node_id 2 for calling a global function with example usage: get_pr_info(pr_number, repo_name, get_diff) and returns: pr_title,  diff, pr,  None