code: def static_cond(pred, fn1, fn2):
      """Return either fn1() or fn2() based on the boolean value of `pred`.
  
      Same signature as `control_flow_ops.cond()` but requires pred to be a bool.
  
      Args:
        pred: A value determining whether to return the result of `fn1` or `fn2`.
        fn1: The callable to be performed if pred is true.
        fn2: The callable to be performed if pred is false.
  
      Returns:
        Tensors returned by the call to either `fn1` or `fn2`.
  
      Raises:
        TypeError: if `fn1` or `fn2` is not callable.
      """
      if not callable(fn1):
          raise TypeError("fn1 must be callable.")
      if not callable(fn2):
          raise TypeError("fn2 must be callable.")
      if pred:
          return fn1()
      else:
          return fn2()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import namedtuple
  from collections import OrderedDict
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import variables
label_desc: Use image node_id 7 for calling a global function with example usage: static_cond(pred, fn1, fn2) and returns: fn1, fn2