code: def test_mixture_with_DiracDelta():
      srng = pt.random.RandomStream(29833)
  
      X_rv = srng.normal(0, 1, name="X")
      Y_rv = dirac_delta(0.0)
      Y_rv.name = "Y"
  
      I_rv = srng.categorical([0.5, 0.5], size=1)
  
      i_vv = I_rv.clone()
      i_vv.name = "i"
  
      M_rv = pt.stack([X_rv, Y_rv])[I_rv]
      M_rv.name = "M"
  
      m_vv = M_rv.clone()
      m_vv.name = "m"
  
      logp_res = conditional_logp({M_rv: m_vv, I_rv: i_vv})
  
      assert m_vv in logp_res
  
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import scipy.stats.distributions
  from pytensor import function
  from pytensor.graph.basic import Variable
  from pytensor.ifelse import ifelse
  from pytensor.tensor.random.basic import CategoricalRV
  from pytensor.tensor.shape import shape_tuple
  from pytensor.tensor.subtensor import AdvancedSubtensor, AdvancedSubtensor1, Subtensor, as_index_constant
  from pymc.logprob.abstract import MeasurableVariable
  from pymc.logprob.basic import conditional_logp, logp
  from pymc.logprob.mixture import MeasurableSwitchMixture, expand_indices
  from pymc.logprob.rewriting import construct_ir_fgraph
  from pymc.logprob.utils import dirac_delta
  from pymc.testing import assert_no_rvs
  from tests.logprob.utils import scipy_logprob
label_desc: Use image node_id 9 for calling a global function with example usage: test_mixture_with_DiracDelta() without return types