code: def _assert_single_array_ndim(arr, ndim, shape_str, to_ntype):
      if arr.ndim != ndim:
          raise ValueError(
              "Tried to convert an array to list of %s. Expected "
              "that array to be of shape %s, i.e. %d-dimensional, but "
              "got %d dimensions instead."
              % (
                  to_ntype,
                  shape_str,
                  ndim,
                  arr.ndim,
              )
          )
  
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 3 for calling a global function with example usage: _assert_single_array_ndim(arr, ndim, shape_str, to_ntype) without return types