code: def test_out_shape_exceptions(path_rgb_byte_tif):
      with rasterio.open(path_rgb_byte_tif) as src:
          for attr in "read", "read_masks":
              reader = getattr(src, attr)
  
              with pytest.raises(ValueError):
                  out = np.empty((src.count, src.height, src.width))
                  out_shape = (src.count, src.height, src.width)
                  reader(out=out, out_shape=out_shape)
  
              with pytest.raises(Exception):
                  out_shape = (5, src.height, src.width)
                  reader(1, out_shape=out_shape)
  
imports: from hashlib import md5
  import unittest
  import numpy
  import pytest
  import rasterio
  from rasterio.errors import DatasetIOShapeError
label_desc: Use image node_id 2 for calling a global function with example usage: test_out_shape_exceptions(path_rgb_byte_tif) without return types