code: def test_factorized_joint_logprob_diff_dims():
      M = pt.matrix("M")
      x = pt.random.normal(0, 1, size=M.shape[1], name="X")
      y = pt.random.normal(M.dot(x), 1, name="Y")
  
      x_vv = x.clone()
      x_vv.name = "x"
      y_vv = y.clone()
      y_vv.name = "y"
  
      logp = conditional_logp({x: x_vv, y: y_vv})
      logp_combined = pt.sum(
          [pt.sum(factor) for factor in logp.values()]
      )
  
      M_val = np.random.normal(size=(10, 3))
      x_val = np.random.normal(size=(3,))
      y_val = np.random.normal(size=(10,))
  
      point = {M: M_val, x_vv: x_val, y_vv: y_val}
      logp_val = logp_combined.eval(point)
  
      exp_logp_val = (
          sp.norm.logpdf(x_val, 0, 1).sum()
          + sp.norm.logpdf(y_val, M_val.dot(x_val), 1).sum()
      )
      assert exp_logp_val == pytest.approx(logp_val)
  
imports: import warnings
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import scipy.stats.distributions
  from pytensor.graph.basic import ancestors, equal_computations
  from pytensor.tensor.random.op import RandomVariable
  from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedIncSubtensor1, IncSubtensor
  import pymc
  from pymc.logprob.basic import conditional_logp, icdf, logcdf, logp, transformed_conditional_logp
  from pymc.logprob.transforms import LogTransform
  from pymc.logprob.utils import replace_rvs_by_values
  from pymc.testing import assert_no_rvs
label_desc: Use image node_id 3 for calling a global function with example usage: test_factorized_joint_logprob_diff_dims() without return types