code: def max_pool(
      inputs,
      pool_size,
      strides=None,
      padding="valid",
      data_format=None,
  ):
      data_format = standardize_data_format(data_format)
      strides = pool_size if strides is None else strides
      padding = padding.upper()
      tf_data_format = _convert_data_format(
          "channels_last", len(inputs.shape)
      )
      if data_format == "channels_first":
          # Tensorflow pooling does not support `channels_first` format, so
          # we need to transpose to `channels_last` format.
          inputs = _transpose_spatial_inputs(inputs)
  
      outputs = tf.nn.max_pool(
          inputs,
          pool_size,
          strides,
          padding,
          tf_data_format,
      )
      if data_format == "channels_first":
          outputs = _transpose_spatial_outputs(outputs)
      return outputs
  
imports: import warnings
  import tensorflow
  from keras.backend import standardize_data_format
  from keras.backend import standardize_dtype
  from keras.backend.common.backend_utils import compute_conv_transpose_output_shape
  from keras.backend.config import epsilon
  from keras.backend.tensorflow.core import cast
  from keras.backend.tensorflow.core import convert_to_tensor
label_desc: Use image node_id 19 for calling a global function with example usage: max_pool(inputs, pool_size, strides, padding, data_format) and returns: outputs