docstr: Test that when setting size from observed we update the rng properly
  See https://github.com/pymc-devs/pymc/issues/5653
docstr_tok: ["Test","that","when","setting","size","from","observed","we","update","the","rng","properly","See","https",":","\/\/github.com\/pymc-devs\/pymc\/issues\/5653"]
code: def test_size_from_observed_rng_update(self):
      """Test that when setting size from observed we update the rng properly
      See https://github.com/pymc-devs/pymc/issues/5653
      """
      with pm.Model():
          x = pm.Normal("x", observed=[0, 1])
  
      fn = pm.pytensorf.compile_pymc([], x)
      # Check that both function outputs (rng and draws) come from the same Apply node
      assert (
          fn.maker.fgraph.outputs[0].owner
          is fn.maker.fgraph.outputs[1].owner
      )
  
      # Confirm that the rng is properly offset, otherwise the second value of the first
      # draw, would match the first value of the second draw
      assert fn()[1] != fn()[0]
  
imports: import re
  import warnings
  import numpy
  import pytensor
  import pytest
  from pytensor import tensor
  from pytensor.compile.mode import Mode
  from pytensor.graph import Constant, ancestors
  from pytensor.tensor import TensorVariable
  from pytensor.tensor.random import normal
  from pytensor.tensor.shape import SpecifyShape
  import pymc
  from pymc import ShapeError
  from pymc.distributions.shape_utils import broadcast_dist_samples_shape, change_dist_size, convert_dims, convert_shape, convert_size, get_support_shape, get_support_shape_1d, rv_size_is_none, to_tuple
  from pymc.model import Model
label_desc: Use image node_id 19 for calling the TestSizeShapeDimsObserved obj's underlying member method code with example usage: obj.test_size_from_observed_rng_update() without return types