code: def gha_get_self_url():
      import requests
  
      # stringed together api call to get the current check's html url.
      sha = os.environ["GITHUB_SHA"]
      repo = os.environ["GITHUB_REPOSITORY"]
      resp = requests.get(
          "https://api.github.com/repos/{}/commits/{}/check-suites".format(
              repo, sha
          )
      )
      data = resp.json()
      for check in data["check_suites"]:
          slug = check["app"]["slug"]
          if slug == "github-actions":
              run_url = check["check_runs_url"]
              html_url = requests.get(run_url).json()["check_runs"][0][
                  "html_url"
              ]
              return html_url
  
      # Return a fallback url
      return "https://github.com/ray-project/ray/actions"
  
imports: import os
  import sys
  import json
label_desc: Use image node_id 1 for calling a global function with example usage: gha_get_self_url() and returns: str, html_url