code: def check_file(filename):
      """Checks a file for CUDA kernel launches without cuda error checks
  
      Args:
          filename - File to check
  
      Returns:
          The number of unsafe kernel launches in the file
      """
      if not (filename.endswith((".cu", ".cuh"))):
          return 0
      if should_exclude_file(filename):
          return 0
      with open(filename) as fo:
          contents = fo.read()
          unsafeCount = check_code_for_cuda_kernel_launches(
              contents, filename
          )
      return unsafeCount
  
file_path: pytorch/torch/testing/_internal/check_kernel_launches.py
imports: import os
  import re
  import sys
  from typing import List
label_desc: Use image node_id 4 for calling a global function with example usage: check_file(filename) and returns: unsafeCount, int, int