code: def test_char_special_case_deep(self):
      # Check that the character special case errors correctly if the
      # array is too deep:
      nested = ["string"]  # 2 dimensions (due to string being sequence)
      for i in range(ncu.MAXDIMS - 2):
          nested = [nested]
  
      arr = np.array(nested, dtype="c")
      assert arr.shape == (1,) * (ncu.MAXDIMS - 1) + (6,)
      with pytest.raises(ValueError):
          np.array([nested], dtype="c")
  
imports: from itertools import permutations, product
  import pytest
  from pytest import param
  import numpy
  import numpy._core._multiarray_umath
  from numpy._core._rational_tests import rational
  from numpy.testing import assert_array_equal, assert_warns, IS_PYPY
label_desc: Use image node_id 3 for calling the TestScalarDiscovery obj's underlying member method code with example usage: obj.test_char_special_case_deep() without return types