code: def test_recoder_2():
      # with explicit name for code
      codes = ((1,), (2,))
      rc = Recoder(codes, ["code1"])
      with pytest.raises(AttributeError):
          rc.code
      assert rc.code1[1] == 1
      assert rc.code1[2] == 2
  
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 2 for calling a global function with example usage: test_recoder_2() without return types