code: def upload_arena(arena, token):
      """Uploads Arena to GitHub Gist
  
      Function run calculations for all not cached plots. Then all
      are exported as static data source and uploaded to GitHub Gist.
  
      Parameters
      -----------
      arena : object of class Arena
          Arena object
      token : str
          GitHub access token
  
      Returns
      --------
      Link to uploaded data source
      """
      import requests
  
      json_str = get_json(arena)
      req = requests.post(
          "https://api.github.com/gists",
          data=json.dumps(
              {
                  "public": False,
                  "description": "Arena static data source",
                  "files": {"datasource.json": {"content": json_str}},
              }
          ),
          headers={"Authorization": "token " + token},
      )
      if not req.ok:
          raise Exception("Failed to upload Arena")
      try:
          url = (
              req.json()
              .get("files")
              .get("datasource.json")
              .get("raw_url")
          )
      except:
          raise Exception("GitHub returned invalid response")
      return url
  
file_path: DALEX/python/dalex/dalex/arena/static.py
imports: import json
  import webbrowser
  import random
  import socket
  import logging
  import sys
  from .server import convert
label_desc: Use image node_id 6 for calling a global function with example usage: upload_arena(arena, token) and returns: url