code: def _pick_scalar_condition(pred, cond_true, cond_false):
      """Convenience function which chooses the condition based on the predicate."""
      # Note: This function is only valid if all of pred, cond_true, and cond_false
      # are scalars. This means its semantics are arguably more like tf.cond than
      # tf.select even though we use tf.select to implement it.
      pred_ = _static_value(pred)
      if pred_ is None:
          return array_ops.where_v2(pred, cond_true, cond_false)
      return cond_true if pred_ else cond_false
  
imports: import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.distributions import distribution
  from tensorflow.python.ops.distributions import identity_bijector
  from tensorflow.python.ops.distributions import util
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 6 for calling a global function with example usage: _pick_scalar_condition(pred, cond_true, cond_false) and returns: unknown, array_ops