code: def test_imsave_incorrect_dimension():
      with temporary_file(suffix=".png") as fname:
          with testing.raises(ValueError):
              with expected_warnings(
                  [fname + " is a low contrast image"]
              ):
                  imsave(fname, np.zeros((2, 3, 3, 1)))
          with testing.raises(ValueError):
              with expected_warnings(
                  [fname + " is a low contrast image"]
              ):
                  imsave(fname, np.zeros((2, 3, 2)))
          # test that low contrast check is ignored
          with testing.raises(ValueError):
              with expected_warnings([]):
                  imsave(
                      fname, np.zeros((2, 3, 2)), check_contrast=False
                  )
  
imports: import os
  from io import BytesIO
  from tempfile import NamedTemporaryFile
  import numpy
  import pytest
  from PIL import Image
  from skimage._shared import testing
  from skimage._shared._tempfile import temporary_file
  from skimage._shared._warnings import expected_warnings
  from skimage._shared.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal, color_check, fetch, mono_check
  from skimage.metrics import structural_similarity
  from ...None import img_as_float
  from ...color import rgb2lab
  from ..None import imread, imsave, reset_plugins, use_plugin, plugin_order
  from .._plugins.pil_plugin import _palette_is_grayscale, ndarray_to_pil, pil_to_ndarray
label_desc: Use image node_id 15 for calling a global function with example usage: test_imsave_incorrect_dimension() without return types