code: def test_set_colorinterp_all(path_4band_no_colorinterp, ci):
      """Test setting with all color interpretations."""
  
      if ci.value == 1:
          pytest.xfail(
              "Setting colorinterp to gray fails with GDAL 2.3, see https://github.com/rasterio/rasterio/issues/1234"
          )
  
      with rasterio.open(path_4band_no_colorinterp, "r+") as src:
          all_ci = list(src.colorinterp)
          all_ci[1] = ci
          src.colorinterp = all_ci
  
      with rasterio.open(path_4band_no_colorinterp) as src:
          assert src.colorinterp[1] == ci
  
imports: import pytest
  import rasterio
  from rasterio.enums import ColorInterp
label_desc: Use image node_id 4 for calling a global function with example usage: test_set_colorinterp_all(path_4band_no_colorinterp, ci) without return types