code: def test_allow_downcast_floatX(self):
      a = fscalar("a")
      b = fvector("b")
  
      f = pfunc([a, b], (a + b), allow_input_downcast=True)
      g = pfunc([a, b], (a + b), allow_input_downcast=False)
      h = pfunc([a, b], (a + b), allow_input_downcast=None)
  
      # If the values can be accurately represented, OK
      assert np.all(f(0, [0]) == 0)
      assert np.all(g(0, [0]) == 0)
      assert np.all(h(0, [0]) == 0)
  
      # For the vector: OK iff allow_input_downcast is True
      assert np.allclose(f(0, [0.1]), 0.1)
      with pytest.raises(TypeError):
          g(0, [0.1])
      with pytest.raises(TypeError):
          h(0, [0.1])
  
      # For the scalar: OK if allow_input_downcast is True,
      # or None and floatX==float32
      assert np.allclose(f(0.1, [0]), 0.1)
      with pytest.raises(TypeError):
          g(0.1, [0])
      if config.floatX == "float32":
          assert np.allclose(h(0.1, [0]), 0.1)
      else:
          with pytest.raises(TypeError):
              h(0.1, [0])
  
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 14 for calling the TestPfunc obj's underlying member method code with example usage: obj.test_allow_downcast_floatX() without return types