code: def test_object_subclass(self):
      class sub(np.ndarray):
          def __new__(cls, inp):
              obj = np.asarray(inp).view(cls)
              return obj
  
          def __getitem__(self, ind):
              ret = super().__getitem__(ind)
              return sub(ret)
  
      # test that object + subclass is OK:
      x = sub([None, None])
      assert_equal(repr(x), "sub([None, None], dtype=object)")
      assert_equal(str(x), "[None None]")
  
      x = sub([None, sub([None, None])])
      assert_equal(
          repr(x),
          "sub([None, sub([None, None], dtype=object)], dtype=object)",
      )
      assert_equal(str(x), "[None sub([None, None], dtype=object)]")
  
imports: import sys
  import gc
  from hypothesis import given
  from hypothesis.extra import numpy
  import pytest
  import numpy
  from numpy.testing import assert_, assert_equal, assert_raises, assert_warns, HAS_REFCOUNT, assert_raises_regex
  from numpy.core.arrayprint import _typelessdata
  import textwrap
label_desc: Use image node_id 3 for calling the TestArrayRepr obj's underlying member method code with example usage: obj.test_object_subclass() and returns: obj, sub