code: def _convert_pooling(self, source_node):
      kwargs = dict()
      kwargs["strides"] = (
          [1] + list(source_node.get_attr("stride")) + [1]
      )
      kwargs["dilations"] = (
          [1] + list(source_node.get_attr("dilation")) + [1]
      )
      kwargs["pads"] = (
          [0] + list(source_node.get_attr("padding")) + [0]
      ) * 2
      kwargs["kernel_shape"] = (
          [1] + list(source_node.get_attr("kernel_size")) + [1]
      )
      IR_node = self._convert_identity_operation(
          source_node, new_op="Pool"
      )
  
      if source_node.name.startswith("Max"):
          kwargs["pooling_type"] = "MAX"
      elif source_node.name.startswith("Avg"):
          kwargs["pooling_type"] = "AVG"
      else:
          raise ValueError("Unknown pooling type")
  
      assign_IRnode_values(IR_node, kwargs)
  
imports: import os
  import numpy
  import mmdnn.conversion.common.IR.graph_pb2
  from mmdnn.conversion.common.IR.graph_pb2 import NodeDef, GraphDef, DataType
  from mmdnn.conversion.common.utils import *
  from mmdnn.conversion.common.DataStructure.parser import Parser
  from mmdnn.conversion.pytorch.pytorch_graph import PytorchGraph040
  from mmdnn.conversion.pytorch.pytorch_graph import PytorchGraph151
  import torch
  import torchvision
label_desc: Use image node_id 29 for calling the PytorchParser obj's underlying member method code with example usage: obj._convert_pooling(source_node) without return types