code: def _assert_single_array_last_dim_exactly(arr, size, to_ntype):
      if arr.shape[-1] != size:
          raise ValueError(
              "Tried to convert an array to a list of %s. Expected the array's "
              "last dimension to have size %d, but got %d instead (array "
              "shape: %s)."
              % (to_ntype, size, arr.shape[-1], str(arr.shape))
          )
  
imports: from __future__ import print_function, division, absolute_import
  import functools
  import numpy
  from ..None import imgaug
  from ..None import dtypes
  from .base import IAugmentable
label_desc: Use image node_id 5 for calling a global function with example usage: _assert_single_array_last_dim_exactly(arr, size, to_ntype) without return types