code: def check_pr(data, problems):
      # no unmerged prs
      if data["node"]["state"] != "MERGED":
          problems.append(f"PR not merged: {description(data)}")
  
      # no prs without a status: accepted label
      labels = get_labels(data)
      if "status: accepted" not in labels:
          problems.append(f"PR missing status: {description(data)}")
  
      # special considerations for "issue prs"
      if any(label.startswith("type:") for label in labels):
          # must have a reso: completed label
          if "reso: completed" not in labels:
              problems.append(
                  f"issue PR missing resolution: {description(data)}"
              )
  
          # must not have more than one reso: label
          if (
              sum(1 for label in labels if label.startswith("reso:"))
              > 1
          ):
              problems.append(
                  f"issue PR has too many resolutions: {description(data)}"
              )
  
      # no prs with more than one status: label
      if sum(1 for label in labels if label.startswith("status:")) > 1:
          problems.append(
              f"PR has too many statuses: {description(data)}"
          )
  
      # no prs with multiple type: labels
      if sum(1 for label in labels if label.startswith("type:")) > 1:
          problems.append(f"PR has multiple types: {description(data)}")
  
      # no prs with invalid type: labels
      if any(
          label not in VALID_TYPES
          for label in labels
          if label.startswith("type:")
      ):
          problems.append(
              f"PR has an invalid type: {description(data)}"
          )
  
      # no prs with TRIAGE label
      if any(label == "TRIAGE" for label in labels):
          problems.append(f"PR is in triage: {description(data)}")
  
file_path: bokeh/scripts/milestone.py
imports: import datetime
  import logging
  import os
  import sys
  from itertools import groupby
  from pathlib import Path
  import click
  import requests
label_desc: Use image node_id 9 for calling a global function with example usage: check_pr(data, problems) without return types