code: def bad_dtype_mgh():
      """This function raises an MGHError exception because
      uint16 is not a valid MGH datatype.
      """
      # try to write an unsigned short and make sure it
      # raises MGHError
      v = np.ones((7, 13, 3, 22), np.uint16)
      # form a MGHImage object using data
      # and the default affine matrix (Note the "None")
      MGHImage(v, None)
  
imports: import io
  import os
  import pathlib
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from ...None import imageglobals
  from ...fileholders import FileHolder
  from ...openers import ImageOpener
  from ...spatialimages import HeaderDataError
  from ...testing import data_path
  from ...tests import test_spatialimages
  from ...tests import test_wrapstruct
  from ...tmpdirs import InTemporaryDirectory
  from ...volumeutils import sys_is_le
  from ...wrapstruct import WrapStructError
  from ..None import load, save
  from ..mghformat import MGHError, MGHHeader, MGHImage
label_desc: Use image node_id 5 for calling a global function with example usage: bad_dtype_mgh() without return types