code: def test_tutorial(self):
      srng = RandomStream(seed=234)
      rv_u = srng.uniform(0, 1, size=(2, 2))
      rv_n = srng.normal(0, 1, size=(2, 2))
  
      f = function([], rv_u)
      # Disabling `default_updates` means that we have to pass
      # `srng.state_updates` to `function` manually, if we want the shared
      # state to change
      g = function([], rv_n, no_default_updates=True)
      nearly_zeros = function([], rv_u + rv_u - 2 * rv_u)
  
      assert np.all(f() != f())
      assert np.all(g() == g())
      assert np.all(abs(nearly_zeros()) < 1e-5)
  
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 1 for calling the TestSharedRandomStream obj's underlying member method code with example usage: obj.test_tutorial() without return types