code: def test_param_allow_downcast_int(self):
      a = wvector("a")  # int16
      b = bvector("b")  # int8
      c = bscalar("c")  # int8
      f = pfunc(
          [
              In(a, allow_downcast=True),
              In(b, allow_downcast=False),
              In(c, allow_downcast=None),
          ],
          (a + b + c),
      )
  
      # Both values are in range. Since they're not ndarrays (but lists),
      # they will be converted, and their value checked.
      assert np.all(f([3], [6], 1) == 10)
  
      # Values are in range, but a dtype too large has explicitly been given
      # For performance reasons, no check of the data is explicitly performed
      # (It might be OK to change this in the future.)
      with pytest.raises(TypeError):
          f([3], np.array([6], dtype="int16"), 1)
  
      # Value too big for a, silently ignored
      assert np.all(f([2**20], np.ones(1, dtype="int8"), 1) == 2)
  
      # Value too big for b, raises TypeError
      with pytest.raises(TypeError):
          f([3], [312], 1)
  
      # Value too big for c, raises TypeError
      with pytest.raises(TypeError):
          f([3], [6], 806)
  
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 10 for calling the TestPfunc obj's underlying member method code with example usage: obj.test_param_allow_downcast_int() without return types