code: def test_non_xla_graph_throws_exception(self):
      if tf.config.functions_run_eagerly():
          self.skipTest("Graph mode test only.")
      x = random_variable.RandomVariable(normal.Normal(0, 1))
  
      @tf.function(autograph=False, jit_compile=True)
      def run():
          tf.convert_to_tensor(x)
  
      run()
      with self.assertRaisesRegexp(
          ValueError, r"different graph context"
      ):
          tf.convert_to_tensor(x)
  
file_path: probability/tensorflow_probability/python/experimental/nn/util/random_variable_test.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.experimental.nn.util import random_variable
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 4 for calling the RandomVariableTest obj's underlying member method code with example usage: obj.test_non_xla_graph_throws_exception() without return types