code: def test_recoder_3():
      # code and label
      codes = ((1, "one"), (2, "two"))
      rc = Recoder(codes)  # just with implicit alias
      assert rc.code[1] == 1
      assert rc.code[2] == 2
      with pytest.raises(KeyError):
          rc.code[3]
      assert rc.code["one"] == 1
      assert rc.code["two"] == 2
      with pytest.raises(KeyError):
          rc.code["three"]
      with pytest.raises(AttributeError):
          rc.label
  
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 3 for calling a global function with example usage: test_recoder_3() without return types