code: def test_skipped_tests_comment(
      caplog,
      tmpdir_factory,
      main_xml_file,
      main_xml_content,
      pr_xml_file,
      pr_xml_content,
      additional_tests_to_check,
      target_url,
      s3_prefix,
      jenkins_prefix,
      common_main_build,
      commit_sha,
      expected_body,
  ):
      """
      Test that a comment with a link to the docs is successfully left on PRs
      """
  
      def write_xml_file(root_dir, xml_file, xml_content):
          shutil.rmtree(root_dir, ignore_errors=True)
          file = root_dir / xml_file
          file.parent.mkdir(parents=True)
          with open(file, "w") as f:
              f.write(textwrap.dedent(xml_content))
  
      git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
      pr_test_report_dir = Path(git.cwd) / "pr-reports"
      write_xml_file(pr_test_report_dir, pr_xml_file, pr_xml_content)
      main_test_report_dir = Path(git.cwd) / "main-reports"
      write_xml_file(
          main_test_report_dir, main_xml_file, main_xml_content
      )
      with open(Path(git.cwd) / "required_tests_to_run.json", "w") as f:
          f.write(additional_tests_to_check)
  
      pr_data = {
          "commits": {
              "nodes": [
                  {
                      "commit": {
                          "oid": commit_sha,
                          "statusCheckRollup": {
                              "contexts": {
                                  "nodes": [
                                      {
                                          "context": "tvm-ci/pr-head",
                                          "targetUrl": target_url,
                                      }
                                  ]
                              }
                          },
                      }
                  }
              ]
          }
      }
      with caplog.at_level(logging.INFO):
          comment = scripts.github.github_skipped_tests_comment.get_skipped_tests_comment(
              pr=pr_data,
              github=None,
              s3_prefix=s3_prefix,
              jenkins_prefix=jenkins_prefix,
              common_commit_sha=commit_sha,
              pr_test_report_dir=pr_test_report_dir,
              main_test_report_dir=main_test_report_dir,
              common_main_build=json.loads(common_main_build),
              additional_tests_to_check_file=Path(git.cwd)
              / "required_tests_to_run.json",
          )
      assert_in(expected_body, comment)
      assert_in(f"with target {target_url}", caplog.text)
  
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 2 for calling a global function with example usage: test_skipped_tests_comment(caplog, tmpdir_factory, main_xml_file, main_xml_content, pr_xml_file, pr_xml_content, additional_tests_to_check, target_url, s3_prefix, jenkins_prefix, common_main_build, commit_sha, expected_body) without return types