code: def test_unmeargeable_dimshuffles():
      # Test that graphs with DimShuffles that cannot be lifted/merged fail
  
      # Initial support axis is at axis=-1
      x = pt.random.dirichlet(
          np.ones((3,)),
          size=(4, 2),
      )
      # Support axis is now at axis=-2
      y = x.dimshuffle((0, 2, 1))
      # Downstream dimshuffle will not be lifted through cumsum. If it ever is,
      # we will need a different measurable Op example
      z = pt.cumsum(y, axis=-2)
      # Support axis is now at axis=-3
      w = z.dimshuffle((1, 0, 2))
  
      w_vv = w.clone()
      # TODO: Check that logp is correct if this type of graphs is ever supported
      with pytest.raises(RuntimeError, match="could not be derived"):
          conditional_logp({w: w_vv})
  
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 11 for calling a global function with example usage: test_unmeargeable_dimshuffles() without return types