code: def _GitHub_release(
      version,
      push,
      username=None,
      user="sympy",
      token=None,
      token_file_path="~/.sympy/release-token",
      repo="sympy",
      draft=False,
  ):
      """
      Upload the release files to GitHub.
  
      The tag must be pushed up first. You can test on another repo by changing
      user and repo.
      """
      if not requests:
          error(
              "requests and requests-oauthlib must be installed to upload to GitHub"
          )
  
      release_text = GitHub_release_text(version)
      short_version = get_sympy_short_version(version)
      tag = "sympy-" + version
      prerelease = short_version != version
  
      urls = URLs(user=user, repo=repo)
      if not username:
          username = input("GitHub username: ")
      token = load_token_file(token_file_path)
      if not token:
          username, password, token = GitHub_authenticate(
              urls, username, token
          )
  
      # If the tag in question is not pushed up yet, then GitHub will just
      # create it off of master automatically, which is not what we want.  We
      # could make it create it off the release branch, but even then, we would
      # not be sure that the correct commit is tagged.  So we require that the
      # tag exist first.
      if not check_tag_exists(version):
          sys.exit(
              red(
                  "The tag for this version has not been pushed yet. Cannot upload the release."
              )
          )
  
      # See https://developer.github.com/v3/repos/releases/#create-a-release
      # First, create the release
      post = {}
      post["tag_name"] = tag
      post["name"] = "SymPy " + version
      post["body"] = release_text
      post["draft"] = draft
      post["prerelease"] = prerelease
  
      print("Creating release for tag", tag, end=" ")
  
      if push:
          result = query_GitHub(
              urls.releases_url,
              username,
              password=None,
              token=token,
              data=json.dumps(post),
          ).json()
          release_id = result["id"]
      else:
          print(green("Not pushing!"))
  
      print(green("Done"))
  
      # Then, upload all the files to it.
      for key in descriptions:
          tarball = get_tarball_name(key, version)
  
          params = {}
          params["name"] = tarball
  
          if tarball.endswith("gz"):
              headers = {"Content-Type": "application/gzip"}
          elif tarball.endswith("pdf"):
              headers = {"Content-Type": "application/pdf"}
          elif tarball.endswith("zip"):
              headers = {"Content-Type": "application/zip"}
          else:
              headers = {"Content-Type": "application/octet-stream"}
  
          print("Uploading", tarball, end=" ")
          sys.stdout.flush()
          with open(
              os.path.join("release/release-" + version, tarball), "rb"
          ) as f:
              if push:
                  result = query_GitHub(
                      urls.release_uploads_url % release_id,
                      username,
                      password=None,
                      token=token,
                      data=f,
                      params=params,
                      headers=headers,
                  ).json()
              else:
                  print(green("Not uploading!"))
  
          print(green("Done"))
  
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 6 for calling a global function with example usage: _GitHub_release(version, push, username, user, token, token_file_path, repo, draft) without return types