code: def pooling_output_shape(dimension_size, pool_size, padding, stride):
      """
      Computes output shape for pooling operation.
  
      Parameters
      ----------
      dimension_size : int
          Size of the dimension. Typically it's image's
          weight or height.
  
      filter_size : int
          Size of the pooling filter.
  
      padding : int
          Size of the zero-padding.
  
      stride : int
          Stride size.
  
      Returns
      -------
      int
      """
      if isinstance(dimension_size, tf.Dimension):
          dimension_size = dimension_size.value
  
      if dimension_size is None:
          return None
  
      if padding in ("SAME", "same"):
          return int(math.ceil(dimension_size / stride))
  
      elif padding in ("VALID", "valid"):
          return int(
              math.ceil((dimension_size - pool_size + 1) / stride)
          )
  
      raise ValueError(
          "{!r} is unknown padding value for pooling".format(padding)
      )
  
imports: from __future__ import division
  import math
  import tensorflow
  from neupy.utils import as_tuple, tf_utils
  from neupy.core.properties import TypedListProperty, ChoiceProperty, FunctionWithOptionsProperty
  from neupy.exceptions import LayerConnectionError
  from .base import BaseLayer
  from .convolutions import Spatial2DProperty
label_desc: Use image node_id 1 for calling a global function with example usage: pooling_output_shape(dimension_size, pool_size, padding, stride) and returns: None, int, int