code: def test_class_map_safety(classes):
      class_map = ClassMap(classes, background=None)
      classes.insert(0, "x")
      assert class_map.get_by_id(0) == "a"
  
      with pytest.raises(ValueError):
          class_map.add_name(class_map._id2class[0])
  
imports: import pytest
  from icevision.all import *
label_desc: Use image node_id 4 for calling a global function with example usage: test_class_map_safety(classes) without return types