code: def get_tidy_args(cmd, exe):
      command, file = cmd["command"], cmd["file"]
      is_cuda = file.endswith(".cu")
      command = re.split(SPACES, command)
      # Adjust compiler command
      if "c++" in command[0]:
          command[0] = "clang-cpp"
          command.insert(1, "-std=c++17")
      elif command[0][-2:] == "cc":
          command[0] = "clang"
      else:
          raise ValueError("Unable to identify compiler.")
      # remove compilation and output targets from the original command
      remove_item_plus_one(command, "-c")
      remove_item_plus_one(command, "-o")
      if is_cuda:
          # replace nvcc's "-gencode ..." with clang's "--cuda-gpu-arch ..."
          archs = get_gpu_archs(command)
          command.extend(archs)
          while True:
              loc = remove_item_plus_one(command, "-gencode")
              if loc < 0:
                  break
          # "-x cuda" is the right usage in clang
          loc = get_index(command, "-x")
          if loc >= 0:
              command[loc + 1] = "cuda"
          remove_item_plus_one(command, "-ccbin")
          remove_item(command, "--expt-extended-lambda")
          remove_item(
              command, "--diag_suppress=unrecognized_gcc_pragma"
          )
      command.extend(get_clang_includes(exe))
      return command, is_cuda
  
imports: import argparse
  import json
  import multiprocessing
  import os
  import re
  import shutil
  import subprocess
  import sys
  from pathlib import Path
  import tomli
label_desc: Use image node_id 9 for calling a global function with example usage: get_tidy_args(cmd, exe) and returns: command,  is_cuda