code: def test_param_allow_downcast_floatX(self):
      a = fscalar("a")
      b = fscalar("b")
      c = fscalar("c")
  
      f = pfunc(
          [
              In(a, allow_downcast=True),
              In(b, allow_downcast=False),
              In(c, allow_downcast=None),
          ],
          (a + b + c),
      )
  
      # If the values can be accurately represented, everything is OK
      assert np.all(f(0, 0, 0) == 0)
  
      # If allow_downcast is True, idem
      assert np.allclose(f(0.1, 0, 0), 0.1)
  
      # If allow_downcast is False, nope
      with pytest.raises(TypeError):
          f(0, 0.1, 0)
  
      # If allow_downcast is None, it should work iff floatX=float32
      if config.floatX == "float32":
          assert np.allclose(f(0, 0, 0.1), 0.1)
      else:
          with pytest.raises(TypeError):
              f(0, 0, 0.1)
  
imports: import numpy
  import pytest
  import pytensor.tensor
  from pytensor.compile import UnusedInputError, get_mode
  from pytensor.compile.function import function, pfunc
  from pytensor.compile.function.pfunc import rebuild_collect_shared
  from pytensor.compile.io import In
  from pytensor.compile.sharedvalue import shared
  from pytensor.configdefaults import config
  from pytensor.graph.utils import MissingInputError
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.tensor.math import sum
  from pytensor.tensor.type import bscalar, bvector, dmatrices, dmatrix, dscalar, dvector, fscalar, fvector, imatrix, iscalar, ivector, ivectors, lscalar, wvector
  from pytensor.utils import PYTHON_INT_BITWIDTH
label_desc: Use image node_id 11 for calling the TestPfunc obj's underlying member method code with example usage: obj.test_param_allow_downcast_floatX() without return types