code: def run_scala_style_checks(extra_profiles):
      build_profiles = extra_profiles + modules.root.build_profile_flags
      set_title_and_block(
          "Running Scala style checks", "BLOCK_SCALA_STYLE"
      )
      profiles = " ".join(build_profiles)
      print(
          "[info] Checking Scala style using SBT with these profiles: ",
          profiles,
      )
      run_cmd([os.path.join(SPARK_HOME, "dev", "lint-scala"), profiles])
  
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 5 for calling a global function with example usage: run_scala_style_checks(extra_profiles) without return types