code: def is_predict_mode(mode):
      """Returns a bool Tensor indicating whether the global mode is PREDICT.
      If :attr:`mode` is `None`, the mode is determined by
      :func:`texar.tf.global_mode`.
      """
      if mode is None:
          return context.global_mode_predict()
      else:
          return tf.equal(mode, tf.estimator.ModeKeys.PREDICT)
  
file_path: texar/texar/tf/utils/mode.py
imports: import tensorflow
  from texar.tf import context
label_desc: Use image node_id 4 for calling a global function with example usage: is_predict_mode(mode) and returns: context, tf