code: def test_stateless_while():
      class StatelessWhile(tf.Module):
          def get_input(self):
              return np.array([6], dtype="float32")
  
          @tf.function(
              input_signature=[
                  tf.TensorSpec(shape=(1,), dtype=tf.float32)
              ]
          )
          def func(self, x):
              i = tf.constant(3.0)
              cond = lambda i: tf.less(i, x)
              body = lambda i: (tf.add(i, 2),)
              r = tf.while_loop(cond, body, [i])
              return r[0]
  
      run_func_graph(StatelessWhile, runtime="vm")
      run_model_graph(StatelessWhile)
  
imports: import tempfile
  import tensorflow
  import numpy
  import pytest
  from common import compare_tf_tvm
  from common import run_tf_code
label_desc: Use image node_id 31 for calling a global function with example usage: test_stateless_while() and returns: np, r