code: def StatelessIf(context, node):
      pred = context[node.inputs[0]][0]
      then_graph = context.get_graph(node.attr.get("then_branch"))
      else_graph = context.get_graph(node.attr.get("else_branch"))
  
      def then_fn():
          context.stack_func_inputs(context[node.inputs[0]])
          then_output_var = convert_graph(context, then_graph)
          context.unstack_func_inputs()
          return then_output_var
  
      def else_fn():
          context.stack_func_inputs(context[node.inputs[0]])
          else_output_var = convert_graph(context, else_graph)
          context.unstack_func_inputs()
          return else_output_var
  
      x = mb.cond(
          pred=pred, _true_fn=then_fn, _false_fn=else_fn, name=node.name
      )
  
      # wraps x as tuple for get_tuple that always follow the cond node.
      x = (x,) if not isinstance(x, (tuple, list)) else x
  
      context.add(node.name, x)
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/frontend/tensorflow2/ops.py
imports: import numpy
  from coremltools.converters.mil.frontend.tensorflow.ops import _transpose_NHWC_to_NCHW, _transpose_NCHW_to_NHWC
  from coremltools.converters.mil.frontend.tensorflow.ops import *
  from coremltools.converters.mil.frontend.tensorflow.dialect_ops import *
label_desc: Use image node_id 2 for calling a global function with example usage: StatelessIf(context, node) and returns: then_output_var, else_output_var