code: def AveragePool(
      shape, auto_pad=None, kernelShape=None, pads=None, strides=None
  ):
      # I don't want to deal with auto_pad
  
      if kernelShape is None:
          kernelShape = [2 for _ in range(2)]
  
      dim = len(kernelShape)
  
      if pads is None:
          pads = [1 for _ in range(dim * 2)]
      if strides is None:
          strides = [1 for _ in range(dim)]
  
      retShape = shape[:-dim]
      dimIdx = 0
      for dimSize in shape[-dim:]:
          padUpper = pads[dimIdx * 2]
          padLower = pads[dimIdx * 2 + 1]
          stride = strides[dimIdx]
          kernelDimSize = kernelShape[dimIdx]
          retShape.append(
              (dimSize + padUpper + padLower - kernelDimSize) // stride
              + 1
          )
          dimIdx = dimIdx + 1
  
      return retShape
  
file_path: MMdnn/mmdnn/conversion/onnx/shape_inference.py
label_desc: Use image node_id 2 for calling a global function with example usage: AveragePool(shape, auto_pad, kernelShape, pads, strides) and returns: retShape