code: def get_main_jenkins_build_number(github, common_commit):
      json = github.get(f"commits/{common_commit}/status")
      for status in reversed(json["statuses"]):
          if status["context"] != "tvm-ci/branch":
              continue
          state = status["state"]
          target_url = str(status["target_url"])
          build_number = (
              target_url[target_url.find("job/main") : len(target_url)]
              .strip("job/main/")
              .strip("/display/redirect")
          )
          assert build_number.isdigit()
          return {"build_number": build_number, "state": state}
      raise RuntimeError(
          f"Failed to find main build number for commit {common_commit}"
      )
  
file_path: tvm/ci/scripts/github/github_skipped_tests_comment.py
imports: import inspect
  import json
  import os
  import logging
  import subprocess
  from xml.etree import ElementTree
  from pathlib import Path
  from typing import Dict, Any, Optional
label_desc: Use image node_id 4 for calling a global function with example usage: get_main_jenkins_build_number(github, common_commit) and returns: dict