code: def test_wrong_shape():
      scalar_map = create_scalar_map((0,))
      brain_model_map = create_geometry_map((1,))
  
      matrix = ci.Cifti2Matrix()
      matrix.extend((scalar_map, brain_model_map))
      hdr = ci.Cifti2Header(matrix)
  
      # correct shape is (2, 10)
      for data in (
          np.random.randn(1, 11),
          np.random.randn(2, 10, 1),
          np.random.randn(1, 2, 10),
          np.random.randn(3, 10),
          np.random.randn(2, 9),
      ):
          with clear_and_catch_warnings():
              with error_warnings():
                  with pytest.raises(UserWarning):
                      ci.Cifti2Image(data, hdr)
          with suppress_warnings():
              img = ci.Cifti2Image(data, hdr)
  
          with pytest.raises(ValueError):
              img.to_file_map()
  
imports: import numpy
  import pytest
  import nibabel
  from nibabel import cifti2
  from nibabel.tmpdirs import InTemporaryDirectory
  from ...testing import assert_array_equal, clear_and_catch_warnings, error_warnings, suppress_warnings
label_desc: Use image node_id 23 for calling a global function with example usage: test_wrong_shape() without return types