code: def test_filter_float_subclass():
      """Make sure `ScalarType.filter` can handle `float` subclasses."""
      with config.change_flags(floatX="float64"):
          test_type = ScalarType("float64")
  
          nan = np.array([np.nan], dtype="float64")[0]
          assert isinstance(nan, float)
  
          filtered_nan = test_type.filter(nan)
          assert isinstance(filtered_nan, float)
  
      with config.change_flags(floatX="float32"):
          # Try again, except this time `nan` isn't a `float`
          test_type = ScalarType("float32")
  
          nan = np.array([np.nan], dtype="float32")[0]
          assert isinstance(nan, np.floating)
  
          filtered_nan = test_type.filter(nan)
          assert isinstance(filtered_nan, np.floating)
  
      with config.change_flags(floatX="float64"):
          filtered_nan = test_type.filter(nan)
          assert isinstance(filtered_nan, np.floating)
  
imports: import numpy
  from pytensor.configdefaults import config
  from pytensor.scalar.basic import IntDiv, ScalarType, TrueDiv, complex64, float32, float64, int8, int32
label_desc: Use image node_id 3 for calling a global function with example usage: test_filter_float_subclass() without return types