code: def check_transform(
      transform, domain, constructor=pt.scalar, test=0, rv_var=None
  ):
      x = constructor("x")
      x.tag.test_value = test
      if rv_var is None:
          rv_var = x
      rv_inputs = rv_var.owner.inputs if rv_var.owner else []
      # test forward and forward_val
      # FIXME: What's being tested here?  That the transformed graph can compile?
      forward_f = pytensor.function(
          [x], transform.forward(x, *rv_inputs)
      )
      # test transform identity
      z = transform.backward(transform.forward(x, *rv_inputs))
      assert z.type == x.type
      identity_f = pytensor.function([x], z, *rv_inputs)
      for val in domain.vals:
          assert_allclose(val, identity_f(val), atol=tol)
  
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from pytensor.tensor.variable import TensorConstant
  import pymc
  import pymc.distributions.transforms
  from pymc.logprob.basic import transformed_conditional_logp
  from pymc.logprob.transforms import Transform
  from pymc.pytensorf import floatX, jacobian
  from pymc.testing import Circ, MultiSimplex, R, Rminusbig, Rplusbig, Simplex, SortedVector, Unit, UnitSortedVector, Vector
label_desc: Use image node_id 1 for calling a global function with example usage: check_transform(transform, domain, constructor, test, rv_var) without return types