class_docstr: Works like a dictionary that automatically assign values for new keys.
code: def get_name(self, name: Hashable) -> int:
      try:
          id = self.name2id[name]
      except KeyError:
          id = len(self.name2id)
          self.name2id[name] = id
          self.id2name[id] = name
  
      return id
  
file_path: icevision/icevision/core/id_map.py
imports: from icevision.imports import *
label_desc: Use image node_id 3 for calling the IDMap obj's underlying member method code with example usage: obj.get_name(name) and returns: id