code: def run_sparkr_style_checks():
      set_title_and_block("Running R style checks", "BLOCK_R_STYLE")
  
      if which("R"):
          # R style check should be executed after `install-dev.sh`.
          # Since warnings about `no visible global function definition` appear
          # without the installation. SEE ALSO: SPARK-9121.
          run_cmd([os.path.join(SPARK_HOME, "dev", "lint-r")])
      else:
          print(
              "Ignoring SparkR style check as R was not found in PATH"
          )
  
imports: import itertools
  from argparse import ArgumentParser
  import os
  import re
  import sys
  import subprocess
  from sparktestsupport import SPARK_HOME, USER_HOME, ERROR_CODES
  from sparktestsupport.shellutils import exit_from_command_with_retcode, run_cmd, rm_r, which
  from sparktestsupport.utils import determine_modules_for_files, determine_modules_to_test, determine_tags_to_exclude, identify_changed_files_from_git_commits
  import sparktestsupport.modules
label_desc: Use image node_id 8 for calling a global function with example usage: run_sparkr_style_checks() without return types