code: def test_truncation_specialized_op(shape_info):
      rng = pytensor.shared(np.random.default_rng())
      x = pt.random.normal(0, 10, rng=rng, name="x")
  
      with Model(coords={"dim": range(100)}) as m:
          if shape_info == "shape":
              xt = Truncated(
                  "xt", dist=x, lower=5, upper=15, shape=(100,)
              )
          elif shape_info == "dims":
              xt = Truncated(
                  "xt", dist=x, lower=5, upper=15, dims=("dim",)
              )
          elif shape_info == "observed":
              xt = Truncated(
                  "xt",
                  dist=x,
                  lower=5,
                  upper=15,
                  observed=np.zeros(100),
              )
          else:
              raise ValueError(
                  f"Not a valid shape_info parametrization: {shape_info}"
              )
  
      assert isinstance(xt.owner.op, TruncatedNormalRV)
      assert xt.shape.eval() == (100,)
  
      # Test RNG is not reused
      assert xt.owner.inputs[0] is not rng
  
      lower_upper = pt.stack(xt.owner.inputs[5:])
      assert np.all(lower_upper.eval() == [5, 15])
  
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import scipy
  from pytensor.tensor.random.basic import GeometricRV, NormalRV
  from pymc import Censored, Model, draw, find_MAP
  from pymc.distributions.continuous import Exponential, Gamma, TruncatedNormal, TruncatedNormalRV
  from pymc.distributions.shape_utils import change_dist_size
  from pymc.distributions.transforms import _default_transform
  from pymc.distributions.truncated import Truncated, TruncatedRV, _truncated
  from pymc.exceptions import TruncationError
  from pymc.logprob.abstract import _icdf
  from pymc.logprob.basic import logcdf, logp
  from pymc.logprob.transforms import IntervalTransform
  from pymc.logprob.utils import ParameterValueError
  from pymc.testing import assert_moment_is_expected
label_desc: Use image node_id 3 for calling a global function with example usage: test_truncation_specialized_op(shape_info) without return types