code: def check_rmarkdown() -> None:
      assert (
          system() != "Windows"
      ), "Document test doesn't support Windows."
      env = os.environ.copy()
      env.update({"MAKEFLAGS": f"-j{os.cpu_count()}"})
      print("Checking R documentation.")
      bin_dir = os.path.dirname(R)
      rscript = os.path.join(bin_dir, "Rscript")
      subprocess.check_call(
          [rscript, "-e", "roxygen2::roxygenize()"], env=env
      )
      output = subprocess.run(
          ["git", "diff", "--name-only"], capture_output=True
      )
      if len(output.stdout.decode("utf-8").strip()) != 0:
          output = subprocess.run(["git", "diff"], capture_output=True)
          raise ValueError(
              "Please run `roxygen2::roxygenize()`. Diff:\n",
              output.stdout.decode("utf-8"),
          )
  
file_path: xgboost/tests/ci_build/test_r_package.py
imports: import argparse
  import os
  import shutil
  import subprocess
  from io import StringIO
  from pathlib import Path
  from platform import system
  from test_utils import R_PACKAGE, ROOT, DirectoryExcursion, cd, print_time, record_time
label_desc: Use image node_id 6 for calling a global function with example usage: check_rmarkdown() without return types