code: def test_memmap_subclass(self):
      class MemmapSubClass(memmap):
          pass
  
      fp = MemmapSubClass(
          self.tmpfp, dtype=self.dtype, shape=self.shape
      )
      fp[:] = self.data
  
      # We keep previous behavior for subclasses of memmap, i.e. the
      # ufunc and __getitem__ output is never turned into a ndarray
      assert_(sum(fp, axis=0).__class__ is MemmapSubClass)
      assert_(sum(fp).__class__ is MemmapSubClass)
      assert_(fp[1:, :-1].__class__ is MemmapSubClass)
      assert fp[[0, 1]].__class__ is MemmapSubClass
  
imports: import sys
  import os
  import mmap
  import pytest
  from pathlib import Path
  from tempfile import NamedTemporaryFile, TemporaryFile
  from numpy import memmap, sum, average, prod, ndarray, isscalar, add, subtract, multiply
  from numpy import arange, allclose, asarray
  from numpy.testing import assert_, assert_equal, assert_array_equal, suppress_warnings, IS_PYPY, break_cycles
label_desc: Use image node_id 18 for calling the TestMemmap obj's underlying member method code with example usage: obj.test_memmap_subclass() without return types