code: def query_github(query, token):
      """Hits the GitHub GraphQL API with the given query and returns the data or None."""
      API_HEADERS = {"Authorization": f"Bearer {token}"}
      BASE_URL = "https://api.github.com/graphql"
      if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
          query_string = " ".join(
              line.strip() for line in query.split("\n")
          )
          logging.debug(
              "POST https://api.github.com/graphql; query:%s",
              query_string,
          )
      response = requests.post(
          BASE_URL, json={"query": query}, headers=API_HEADERS
      )
      errors = response.json().get("errors", [])
      for error in errors:
          path = "/".join(error["path"])
          msg = error["message"]
          print(f"error: {path}: {msg}", file=sys.stderr)
      if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
          logging.debug(
              f"Response {response.status_code}: {response.text}"
          )
      return response.json()["data"] if not errors else None
  
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 1 for calling a global function with example usage: query_github(query, token) and returns: unknown