code: def query_GitHub(
      url,
      username=None,
      password=None,
      token=None,
      data=None,
      OTP=None,
      headers=None,
      params=None,
      files=None,
  ):
      """
      Query GitHub API.
  
      In case of a multipage result, DOES NOT query the next page.
  
      """
      headers = headers or {}
  
      if OTP:
          headers["X-GitHub-OTP"] = OTP
  
      if token:
          auth = OAuth2(
              client_id=username,
              token={"access_token": token, "token_type": "bearer"},
          )
      else:
          auth = HTTPBasicAuth(username, password)
      if data:
          r = requests.post(
              url,
              auth=auth,
              data=data,
              headers=headers,
              params=params,
              files=files,
          )
      else:
          r = requests.get(
              url,
              auth=auth,
              headers=headers,
              params=params,
              stream=True,
          )
  
      if r.status_code == 401:
          two_factor = r.headers.get("X-GitHub-OTP")
          if two_factor:
              print(
                  "A two-factor authentication code is required:",
                  two_factor.split(";")[1].strip(),
              )
              OTP = input("Authentication code: ")
              return query_GitHub(
                  url,
                  username=username,
                  password=password,
                  token=token,
                  data=data,
                  OTP=OTP,
              )
  
          raise AuthenticationFailed("invalid username or password")
  
      r.raise_for_status()
      return r
  
imports: import os
  import json
  from subprocess import check_output
  from collections import OrderedDict, defaultdict
  from collections.abc import Mapping
  import glob
  from contextlib import contextmanager
  import requests
  from requests_oauthlib import OAuth2
label_desc: Use image node_id 15 for calling a global function with example usage: query_GitHub(url, username, password, token, data, OTP, headers, params, files) and returns: r, query_GitHub