docstr: This is a regression test for #569.
  
  Functionally, it covers the same case as `test_multiple_output_node`
docstr_tok: ["This","is","a","regression","test","for","#","569",".","Functionally",",","it","covers","the","same","case","as","`","test_multiple_output_node","`"]
code: def test_multi_output_node_random_variable(self):
      """This is a regression test for #569.
  
      Functionally, it covers the same case as `test_multiple_output_node`
      """
  
      # RandomVariables have two outputs, a hidden RNG and the visible draws
      beta0 = pt.random.normal(name="beta0")
      beta1 = pt.random.normal(name="beta1")
  
      out1 = beta0 + 1
      out2 = beta1 * pt.exp(out1)
  
      # We replace the second output of each RandomVariable
      new_beta0 = pt.tensor("new_beta0", shape=(3,))
      new_beta1 = pt.tensor("new_beta1", shape=(3,))
  
      new_outs = vectorize_graph(
          [out1, out2],
          replace={
              beta0: new_beta0,
              beta1: new_beta1,
          },
      )
  
      expected_new_outs = [
          new_beta0 + 1,
          new_beta1 * pt.exp(new_beta0 + 1),
      ]
      assert equal_computations(new_outs, expected_new_outs)
  
imports: import numpy
  import pytest
  import scipy.special
  import pytensor.tensor
  from pytensor import config, function, shared
  from pytensor.graph.basic import equal_computations, graph_inputs
  from pytensor.graph.replace import clone_replace, graph_replace, vectorize_graph, vectorize_node
  from pytensor.tensor import dvector, fvector, vector
  from tests import unittest_tools
  from tests.graph.utils import MyOp, MyVariable, op_multiple_outputs
label_desc: Use image node_id 4 for calling the TestVectorizeGraph obj's underlying member method code with example usage: obj.test_multi_output_node_random_variable() without return types