code: def test_skip_ci(
      tmpdir_factory, commands, should_skip, pr_title, why
  ):
      """
      Test that CI is skipped when it should be
      """
      skip_ci_script = JENKINS_SCRIPT_ROOT / "git_skip_ci.py"
  
      git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
  
      git.run("config", "user.name", "ci")
      git.run("config", "user.email", "email@example.com")
      git.run("commit", "--allow-empty", "--message", "base commit")
      for command in commands:
          git.run(*command)
      pr_number = "1234"
      proc = run_script(
          [skip_ci_script, "--pr", pr_number, "--pr-title", pr_title],
          cwd=git.cwd,
          check=False,
      )
      expected = 0 if should_skip else 1
      if proc.returncode != expected:
          raise RuntimeError(
              f"Unexpected return code {proc.returncode} "
              f"(expected {expected}) in {why}:\n{proc.stdout}"
          )
  
imports: import shutil
  import subprocess
  import json
  import textwrap
  import sys
  import logging
  from pathlib import Path
  import pytest
  import tvm.testing
  from .test_utils import REPO_ROOT, GITHUB_SCRIPT_ROOT, JENKINS_SCRIPT_ROOT, TempGit, run_script
  import scripts.github
  import scripts.jenkins
  from scripts.github.update_branch import EXPECTED_CI_JOBS
label_desc: Use image node_id 8 for calling a global function with example usage: test_skip_ci(tmpdir_factory, commands, should_skip, pr_title, why) without return types