code: def test_observe_minibatch():
      data = np.zeros((100,), dtype=config.floatX)
      batch_size = 10
      with pm.Model() as m_old:
          x = pm.Normal("x")
          y = pm.Normal("y", x)
          # Minibatch RVs are usually created with `total_size` kwarg
          z_raw = pm.Normal.dist(y, shape=batch_size)
          mb_z = create_minibatch_rv(z_raw, total_size=data.shape)
          m_old.register_rv(mb_z, name="mb_z")
  
      mb_data = pm.Minibatch(data, batch_size=batch_size)
      m_new = observe(m_old, {mb_z: mb_data})
  
      assert len(m_new.free_RVs) == 2
      assert len(m_new.observed_RVs) == 1
      assert m_new["x"] in m_new.free_RVs
      assert m_new["y"] in m_new.free_RVs
      assert m_new["mb_z"] in m_new.observed_RVs
  
      np.testing.assert_allclose(
          m_old.compile_logp()(
              {"x": 0.9, "y": 0.5, "mb_z": np.zeros(10)}
          ),
          m_new.compile_logp()({"x": 0.9, "y": 0.5}),
      )
  
imports: import arviz
  import numpy
  import pytest
  from pytensor import config
  import pymc
  from pymc.distributions.transforms import logodds
  from pymc.model.transform.conditioning import change_value_transforms, do, observe, remove_value_transforms
  from pymc.variational.minibatch_rv import create_minibatch_rv
label_desc: Use image node_id 2 for calling a global function with example usage: test_observe_minibatch() without return types