code: def MaxPooling(
      inputs,
      pool_size,
      strides=None,
      padding="valid",
      data_format="channels_last",
  ):
      """
      Same as `tf.layers.MaxPooling2D`. Default strides is equal to pool_size.
      """
      if strides is None:
          strides = pool_size
      layer = tf.layers.MaxPooling2D(
          pool_size, strides, padding=padding, data_format=data_format
      )
      ret = layer.apply(inputs, scope=tf.get_variable_scope())
      return tf.identity(ret, name="output")
  
file_path: tensorpack/tensorpack/models/pool.py
imports: import numpy
  from ..compat import tfv1
  from ..utils.argtools import get_data_format, shape2d
  from .common import layer_register
  from .shape_utils import StaticDynamicShape
  from .tflayer import convert_to_tflayer_args
label_desc: Use image node_id 1 for calling a global function with example usage: MaxPooling(inputs, pool_size, strides, padding, data_format) and returns: tf