class_docstr: Conditional execution. The return types must be identical between the true
  and false branches.
  
  Parameters
  ----------
  pred: tensor<[], bool> (Required)
      * 0D tensor (scalar) predicate to switch between true and fall branches.
  
  _true_fn: Python function (Required)
      * A Python function that will be executed if ``cond`` evaluates to ``True``. It must take 0 input and return one or more values, whose types will be taken to be the return type of the operation.
  
  _false_fn: Python function (Required)
      * A Python function to be executed if ``cond`` evaluates to ``False``. It must take 0 input and has return types must match those of if_branch.
  
  Returns
  -------
  Python tuple
      * Tuple of ``Variables`` from one of the branches.
class_docstr_tok: ["Conditional","execution",".","The","return","types","must","be","identical","between","the","true","and","false","branches",".","Parameters","--","--","--","--","--","pred",":","tensor","<","[","]",",","bool",">","(","Required",")","*","0D","tensor","(","scalar",")","predicate","to","switch","between","true","and","fall","branches",".","_true_fn",":","Python","function","(","Required",")","*","A","Python","function","that","will","be","executed","if","``","cond","``","evaluates","to","``","True","``",".","It","must","take","0","input","and","return","one","or","more","values",",","whose","types","will","be","taken","to","be","the","return","type","of","the","operation",".","_false_fn",":","Python","function","(","Required",")","*","A","Python","function","to","be","executed","if","``","cond","``","evaluates","to","``","False","``",".","It","must","take","0","input","and","has","return","types","must","match","those","of","if_branch",".","Returns","--","--","--","-","Python","tuple","*","Tuple","of","``","Variables","``","from","one","of","the","branches","."]
code: def type_inference(self):
      true_ret_vars = self.blocks[0].outputs
      false_ret_vars = self.blocks[1].outputs
      # Verify true_ret_vars has the same types as false_ret_vars
      for i, (vt, vf) in enumerate(zip(true_ret_vars, false_ret_vars)):
          if vt.sym_type != vf.sym_type:
              msg = (
                  "true branch output {} type {} mismatch false branch"
                  + " output type {}"
              )
              raise ValueError(
                  msg.format(vt.name, vt.sym_type, vf.sym_type)
              )
  
      return tuple(v.sym_type for v in true_ret_vars)
  
imports: import six
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types.type_mapping import numpy_val_to_builtin_val, is_subtype
  import copy
  from coremltools.converters.mil.mil import Block, SYMBOL, NONE
  from coremltools.converters.mil.mil.var import Var
  from coremltools.converters.mil.mil import get_new_symbol
  from ._op_reqs import *
  import logging
label_desc: Use image node_id 3 for calling the cond obj's underlying member method code with example usage: obj.type_inference() and returns: tuple