code: def StatelessWhile(context, node):
      # inputs are loop_counter, max_iterations, [loop_vars]
      loop_vars = context[node.inputs[0]][2:]
  
      cond_graph = context.get_graph(node.attr.get("cond"))
      body_graph = context.get_graph(node.attr.get("body"))
  
      def cond(*loop_vars):
          context.stack_func_inputs(loop_vars)
          cond_output_vars = convert_graph(context, cond_graph)
          context.unstack_func_inputs()
          return cond_output_vars
  
      def body(*loop_vars):
          context.stack_func_inputs(loop_vars)
          body_output_vars = convert_graph(context, body_graph)
          context.unstack_func_inputs()
          return body_output_vars
  
      x = mb.while_loop(
          _cond=cond, _body=body, loop_vars=loop_vars, name=node.name
      )
  
      # wraps x as tuple for get_tuple that always follow the while node.
      x = (x,) if not isinstance(x, (tuple, list)) else x
  
      context.add(node.name, x)
  
file_path: coremltools/coremltools/converters/mil/frontend/tensorflow2/ops.py
imports: import numpy
  from coremltools.converters.mil.frontend.tensorflow.convert_utils import convert_graph
  from coremltools.converters.mil.frontend.tensorflow.ops import _transpose_NCDHW_to_NDHWC, _transpose_NCHW_to_NHWC, _transpose_NDHWC_to_NCDHW, _transpose_NHWC_to_NCHW
  from coremltools.converters.mil.frontend.tensorflow.tf_op_registry import register_tf_op
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.types import builtin_to_string
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic
label_desc: Use image node_id 3 for calling a global function with example usage: StatelessWhile(context, node) and returns: cond_output_vars, body_output_vars