code: def map_pooling(cls, node):
      parent, _ = node.get_only_parent()
      kwargs = cls.get_kernel_params(node, parent.output_shape)
      if node.parameters.pool == 0:
          kwargs["pooling_type"] = "MAX"
      elif node.parameters.pool == 1:
          kwargs["pooling_type"] = "AVG"
      else:
          # Stochastic pooling, for instance.
          raise ConversionError("Unsupported pooling type.")
      cls._convert_output_shape(kwargs, node)
      return Node.create("Pool", **kwargs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  import numpy
  from mmdnn.conversion.caffe.errors import ConversionError
  from mmdnn.conversion.caffe.common_graph import Node
  from mmdnn.conversion.caffe.network import DEFAULT_PADDING
  from mmdnn.conversion.caffe.utils import get_lower_case
  from mmdnn.conversion.common.IR.graph_pb2 import TensorShape
label_desc: Use image node_id 11 for calling the NodeMapper obj's underlying member method code with example usage: obj.map_pooling(cls, node) and returns: Node