class_docstr: Utility class for mapping between class name and id.
class_docstr_tok: ["Utility","class","for","mapping","between","class","name","and","id","."]
code: def add_name(self, name: str) -> int:
      # Raise error if trying to add duplicate value
      if name in self._id2class:
          raise ValueError(
              f"'{name}' already exists in the ClassMap. You can only add new labels that are unique"
          )
  
      self._id2class.append(name)
      id = len(self._class2id)
      self._class2id[name] = id
      return id
  
file_path: icevision/icevision/core/class_map.py
imports: from icevision.imports import *
label_desc: Use image node_id 6 for calling the ClassMap obj's underlying member method code with example usage: obj.add_name(name) and returns: id