code: def getNameToHashesDict(path: str) -> Dict[str, List[str]]:
      """
      Returns a dictionary that maps kernel names to a list of hashes that have the same kernel name
      in the given path
      Note: the hashes must have a json file and either a ttir or ttgir file, otherwise they are ignored
      """
      nameToHashes = {}
      for hash in os.listdir(path):
          fullPath = os.path.join(path, hash)
          if not os.path.isdir(fullPath):
              print(f"Path {fullPath} is not a directory!")
              sys.exit(2)
          fileVec = getFileVec(fullPath)
          if len(fileVec) < 2 or fileVec[0][0] != "json":
              continue
          jsonFile = fileVec[0][1]
          # load json file
          with open(jsonFile, "r") as file:
              content = yaml.safe_load(file)
              # get name
              name = content["name"]
              nameToHashes.setdefault(name, []).append(hash)
      return nameToHashes
  
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 7 for calling a global function with example usage: getNameToHashesDict(path) and returns: nameToHashes