code: def _global_avg_pool(x):
      assert x.get_shape().ndims == 4
      return tf.reduce_mean(x, [1, 2])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from cleverhans.serial import NoRefModel
label_desc: Use image node_id 7 for calling a global function with example usage: _global_avg_pool(x) and returns: tf