code: def main(args) -> bool:
      """
      Iterates over all kernels in the given yaml file and compares them
      in the given paths
      """
      if args.path1 == args.path2:
          print("Cannot compare files in the same directory!")
          sys.exit(2)
      # Get kernel name to hashes dict, these hashes would have the same kernel name
      nameToHashes1 = getNameToHashesDict(args.path1)
      nameToHashes2 = getNameToHashesDict(args.path2)
  
      # Get all kernels that need to be checked
      kernelNames = set(nameToHashes1.keys()).union(
          set(nameToHashes2.keys())
      )
  
      results = []
      # iterate over the kernels that need to be checked
      for name in kernelNames:
          # Compare all hashes on path 1 with all hashes on path 2
          # result is either the mismatching (file1, file2) with "extension" or empty tuple if no mismatch
          result = compareMatchingFiles(
              name, nameToHashes1, nameToHashes2, args
          )
          print(result)
          # Otherwise, add it to the mismatches
          results.append(result)
  
      # Dump results
      dumpResults(results, "kernels_reference_check.txt")
  
      success = all(result.isSuccess() for result in results)
  
      if not success:
          print("Failed!")
          sys.exit(1)
  
      print("Passed!")
      sys.exit(0)
  
imports: import argparse
  import difflib
  import glob
  import os
  import sys
  from typing import Dict, List, Optional, Tuple
  import yaml
label_desc: Use image node_id 11 for calling a global function with example usage: main(args) without return types