code: def test_add_codes():
      codes = ((1, "one", "1", "first"), (2, "two"))
      rc = Recoder(codes)
      assert rc.code["two"] == 2
      with pytest.raises(KeyError):
          rc.code["three"]
      rc.add_codes(((3, "three"), (1, "number 1")))
      assert rc.code["three"] == 3
      assert rc.code["number 1"] == 1
  
file_path: nibabel/nibabel/tests/test_recoder.py
imports: import numpy
  import pytest
  from ..volumeutils import DtypeMapper, Recoder, native_code, swapped_code
label_desc: Use image node_id 8 for calling a global function with example usage: test_add_codes() without return types