code: def test_darray_dtype_coercion_failures():
      dtypes = (np.uint8, np.int32, np.int64, np.float32, np.float64)
      encodings = ("ASCII", "B64BIN", "B64GZ")
      for data_dtype, darray_dtype, encoding in itertools.product(
          dtypes, dtypes, encodings
      ):
          da = GiftiDataArray(
              np.arange(10, dtype=data_dtype),
              encoding=encoding,
              intent="NIFTI_INTENT_NODE_INDEX",
              datatype=darray_dtype,
          )
          gii = GiftiImage(darrays=[da])
          gii_copy = GiftiImage.from_bytes(gii.to_bytes(mode="force"))
          da_copy = gii_copy.darrays[0]
          assert np.dtype(da_copy.data.dtype) == np.dtype(darray_dtype)
          assert_array_equal(da_copy.data, da.data)
  
imports: import itertools
  import sys
  import warnings
  from io import BytesIO
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from nibabel.tmpdirs import InTemporaryDirectory
  from ...None import load
  from ...fileholders import FileHolder
  from ...nifti1 import data_type_codes
  from ...testing import get_test_data
  from ..None import GiftiCoordSystem, GiftiDataArray, GiftiImage, GiftiLabel, GiftiLabelTable, GiftiMetaData, GiftiNVPairs
  from .test_parse_gifti_fast import DATA_FILE1, DATA_FILE2, DATA_FILE3, DATA_FILE4, DATA_FILE5, DATA_FILE6
label_desc: Use image node_id 16 for calling a global function with example usage: test_darray_dtype_coercion_failures() without return types