code: def global_mode_train():
      """Returns a bool Tensor indicating whether the global mode is TRAIN.
  
      Example:
  
          .. code-block:: python
  
              is_train = session.run(global_mode_train())
              # is_train == True
  
              is_train = session.run(
                  global_mode_train()
                  feed_dict={tf.global_mode(): tf.estimator.ModeKeys.PREDICT})
              # is_train == False
      """
      mode = global_mode()
      return tf.equal(mode, tf.estimator.ModeKeys.TRAIN)
  
imports: import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: global_mode_train() and returns: tf