code: def test_assert_true_var_capture():
      g = tf.Graph()
      with g.as_default():
          x = tf.placeholder(tf.float32, shape=())
  
          # It turns out that tf.assert() creates a large and complex subgraph if
          # you capture a variable as part of the error message. So we need to
          # test that, too.
          assert_op = tf.Assert(tf.less_equal(x, x), ["it failed", x])
  
          with tf.Session() as sess:
              x_value = np.random.rand()
              assert sess.run(assert_op, feed_dict={x: x_value}) is None
  
          # TODO: The frontend converter notes the output of
          # the graph as a boolean, which is not correct - as you can see above,
          # TF believes that the value of this graph is None.
          np.testing.assert_allclose(
              True, run_relay(g, None, x_value).numpy()
          )
  
imports: import numpy
  from tvm import relay, ir, testing
  from tvm.relay.frontend.tensorflow import from_tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: test_assert_true_var_capture() without return types