code: def test_filter_ndarray_subclass():
      """Make sure `TensorType.filter` can handle NumPy `ndarray` subclasses."""
      test_type = TensorType(config.floatX, shape=(None,))
  
      class MyNdarray(np.ndarray):
          pass
  
      test_val = np.array([1.0], dtype=config.floatX).view(MyNdarray)
      assert isinstance(test_val, MyNdarray)
  
      res = test_type.filter(test_val)
      assert isinstance(res, MyNdarray)
      assert res is test_val
  
imports: import os.path
  from tempfile import mkdtemp
  import numpy
  import pytest
  import pytensor.tensor
  from pytensor.configdefaults import config
  from pytensor.tensor.shape import SpecifyShape
  from pytensor.tensor.type import TensorType, col, matrix, row, scalar, tensor, tensor3, tensor4, tensor5, tensor6, tensor7, vector
label_desc: Use image node_id 8 for calling a global function with example usage: test_filter_ndarray_subclass() without return types