code: def test_in_allow_downcast_floatX(self):
      a = fscalar("a")
      b = fscalar("b")
      c = fscalar("c")
  
      f = function(
          [
              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.array_equal(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 os
  import pickle
  import re
  import shutil
  import tempfile
  import numpy
  import pytest
  from pytensor.compile import shared
  from pytensor.compile.function import function, function_dump
  from pytensor.compile.io import In
  from pytensor.configdefaults import config
  from pytensor.tensor.type import bscalar, bvector, dscalar, dvector, fscalar, fvector, vector, wvector
label_desc: Use image node_id 9 for calling the TestFunctionIn obj's underlying member method code with example usage: obj.test_in_allow_downcast_floatX() without return types