code: def test_multiple_rng_aliasing(self, rng_ctor):
      # Test that when we have multiple random number generators, we do not alias
      # the state_updates member. `state_updates` can be useful when attempting to
      # copy the (random) state between two similar pytensor graphs. The test is
      # meant to detect a previous bug where state_updates was initialized as a
      # class-attribute, instead of the __init__ function.
  
      rng1 = RandomStream(1234, rng_ctor=rng_ctor)
      rng2 = RandomStream(2392, rng_ctor=rng_ctor)
      assert rng1.state_updates is not rng2.state_updates
      assert rng1.gen_seedgen is not rng2.gen_seedgen
  
file_path: pytensor/tests/tensor/random/test_utils.py
imports: import numpy
  import pytest
  from pytensor import config, function
  from pytensor.compile.mode import Mode
  from pytensor.graph.rewriting.db import RewriteDatabaseQuery
  from pytensor.tensor.random.utils import RandomStream, broadcast_params, supp_shape_from_ref_param_shape
  from pytensor.tensor.type import matrix, tensor
  from tests import unittest_tools
label_desc: Use image node_id 6 for calling the TestSharedRandomStream obj's underlying member method code with example usage: obj.test_multiple_rng_aliasing(rng_ctor) without return types