code: def test__raise_wrong_dim_value_error_raises_error():
      import re
  
      arr_shape = (3, 3)
      with pytest.raises(
          ValueError,
          match=re.escape(
              f"Received image array with shape: {arr_shape}, expected number of image array dimensions are 3 for rgb "
              f"image and 2 for grayscale image!"
          ),
      ):
          _raise_wrong_dim_value_error(arr_shape)
  
imports: import pytest
  from pathlib import Path
  import numpy
  from PIL import Image
  from imagededup.utils.image_utils import preprocess_image, load_image, _check_3_dim, _add_third_dim, _raise_wrong_dim_value_error, check_image_array_hash, expand_image_array_cnn
label_desc: Use image node_id 4 for calling a global function with example usage: test__raise_wrong_dim_value_error_raises_error() without return types