code: def even_odd_program():
      ab = dsl.ProgramBuilder()
  
      def pred_type(_):
          return instructions.TensorType(np.bool_, ())
  
      odd = ab.declare_function("odd", type_inference=pred_type)
  
      with ab.function("even", type_inference=pred_type) as even:
          ab.param("n")
          ab.var.cond = ab.primop(lambda n: n <= 0)
          with ab.if_(ab.var.cond, then_name="base-case"):
              ab.var.ans = ab.const(True)
          with ab.else_(else_name="recur", continue_name="finish"):
              ab.var.nm1 = ab.primop(lambda n: n - 1)
              ab.var.ans = ab.call(odd, [ab.var.nm1])
          ab.return_(ab.var.ans)
  
      with ab.define_function(odd):
          ab.param("n")
          ab.var.cond = ab.primop(lambda n: n <= 0)
          with ab.if_(ab.var.cond, then_name="base-case"):
              ab.var.ans = ab.const(False)
          with ab.else_(else_name="recur", continue_name="finish"):
              ab.var.nm1 = ab.primop(lambda n: n - 1)
              ab.var.ans = ab.call(even, [ab.var.nm1])
          ab.return_(ab.var.ans)
  
      prog = ab.program(main=even)
      return prog
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.auto_batching import allocation_strategy
  from tensorflow_probability.python.experimental.auto_batching import dsl
  from tensorflow_probability.python.experimental.auto_batching import instructions
  from tensorflow_probability.python.experimental.auto_batching import lowering
  from tensorflow_probability.python.experimental.auto_batching import numpy_backend
  from tensorflow_probability.python.experimental.auto_batching import tf_backend
  from tensorflow_probability.python.experimental.auto_batching import type_inference
  from tensorflow_probability.python.experimental.auto_batching import virtual_machine
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 3 for calling a global function with example usage: even_odd_program() and returns: prog, instructions