code: def test_pathological_self_containing(self):
      # Test that this also works for two nested sequences
      l = []
      l.append(l)
      arr = np.array([l, l, l], dtype=object)
      assert arr.shape == (3,) + (1,) * (ncu.MAXDIMS - 1)
  
      # Also check a ragged case:
      arr = np.array([l, [None], l], dtype=object)
      assert arr.shape == (3, 1)
  
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 2 for calling the TestNested obj's underlying member method code with example usage: obj.test_pathological_self_containing() without return types