code: def _grad_op(self, out_grad):
      input_act_vars = self._get_input_activation_vars()
      mask = 1.0 * tf.cast(
          tf.equal(
              tf.reduce_max(input_act_vars, axis=1, keepdims=True),
              input_act_vars,
          ),
          dtype=tf.float32,
      )
      # mask should sum to 1 across axis=1
      # mask = mask/tf.reduce_sum(mask, axis=1, keepdims=True)
      return tf.multiply(tf.expand_dims(out_grad, axis=1), mask)
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import absolute_import
  from .core import *
  from .helper_functions import conv1d_transpose_via_conv2d
  from .convolutional import PaddingMode, DataFormat
  from .None import helper_functions
  import tensorflow
  from tensorflow.python.ops import nn_grad
label_desc: Use image node_id 5 for calling the GlobalMaxPool1D obj's underlying member method code with example usage: obj._grad_op(out_grad) and returns: tf