code: def test_map_iterator():
      from pybind11_tests import StringMap
  
      m = StringMap({"hi": "bye", "black": "white"})
      assert m["hi"] == "bye"
      assert len(m) == 2
      assert m["black"] == "white"
  
      with pytest.raises(KeyError):
          assert m["orange"]
      m["orange"] = "banana"
      assert m["orange"] == "banana"
  
      expected = {"hi": "bye", "black": "white", "orange": "banana"}
      for k in m:
          assert m[k] == expected[k]
      for k, v in m.items():
          assert v == expected[k]
  
imports: import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: test_map_iterator() without return types