code: def _check_array(
      array,
      expected_dtype,
      expected_shape,
      expected_data_list=None,
      device=None,
  ):
      expected_dtype = chainerx.dtype(expected_dtype)
  
      assert isinstance(array.dtype, chainerx.dtype)
      assert isinstance(array.shape, tuple)
      assert array.dtype == expected_dtype
      assert array.shape == expected_shape
      assert array.itemsize == expected_dtype.itemsize
      assert array.size == array_utils.total_size(expected_shape)
      assert (
          array.nbytes
          == expected_dtype.itemsize
          * array_utils.total_size(expected_shape)
      )
      if expected_data_list is not None:
          assert array._debug_flat_data == expected_data_list
  
      assert array.is_contiguous
  
      array_utils.check_device(array, device)
  
imports: import copy
  import math
  import pickle
  import numpy
  import pytest
  import chainerx
  import chainerx.testing
  from chainerx_tests import array_utils
label_desc: Use image node_id 1 for calling a global function with example usage: _check_array(array, expected_dtype, expected_shape, expected_data_list, device) without return types