code: def test_measurable_join_multivariate(
      size1, supp_size1, size2, supp_size2, axis, concatenate
  ):
      base1_rv = pt.random.multivariate_normal(
          np.zeros(supp_size1),
          np.eye(supp_size1),
          size=size1,
          name="base1",
      )
      base2_rv = pt.random.dirichlet(
          np.ones(supp_size2), size=size2, name="base2"
      )
      if concatenate:
          y_rv = pt.concatenate((base1_rv, base2_rv), axis=axis)
      else:
          y_rv = pt.stack((base1_rv, base2_rv), axis=axis)
      y_rv.name = "y"
  
      base1_vv = base1_rv.clone()
      base2_vv = base2_rv.clone()
      y_vv = y_rv.clone()
      base_logps = [
          pt.atleast_1d(logp)
          for logp in conditional_logp(
              {base1_rv: base1_vv, base2_rv: base2_vv}
          ).values()
      ]
  
      if concatenate:
          axis_norm = np.core.numeric.normalize_axis_index(
              axis, base1_rv.ndim
          )
          base_logps = pt.concatenate(base_logps, axis=axis_norm - 1)
      else:
          axis_norm = np.core.numeric.normalize_axis_index(
              axis, base1_rv.ndim + 1
          )
          base_logps = pt.stack(base_logps, axis=axis_norm - 1)
      y_logp = y_logp = logp(y_rv, y_vv)
      assert_no_rvs(y_logp)
  
      base1_testval = base1_rv.eval()
      base2_testval = base2_rv.eval()
      if concatenate:
          y_testval = np.concatenate(
              (base1_testval, base2_testval), axis=axis
          )
      else:
          y_testval = np.stack(
              (base1_testval, base2_testval), axis=axis
          )
      np.testing.assert_allclose(
          base_logps.eval(
              {base1_vv: base1_testval, base2_vv: base2_testval}
          ),
          y_logp.eval({y_vv: y_testval}),
      )
  
imports: import numpy
  import pytensor
  import pytest
  from pytensor import tensor
  from pytensor.graph import RewriteDatabaseQuery
  from pytensor.graph.rewriting.basic import in2out
  from pytensor.graph.rewriting.utils import rewrite_graph
  from pytensor.tensor.basic import Alloc
  from scipy import stats
  from pymc.logprob.basic import conditional_logp, logp
  from pymc.logprob.rewriting import logprob_rewrites_db
  from pymc.logprob.tensor import naive_bcast_rv_lift
  from pymc.testing import assert_no_rvs
label_desc: Use image node_id 8 for calling a global function with example usage: test_measurable_join_multivariate(size1, supp_size1, size2, supp_size2, axis, concatenate) without return types