code: def _convert_padding_api(self, source_node, IR_node):
      # name, op
      CoremlParser._copy_and_reop(source_node, IR_node, "Pad")
  
      # input edge
      self.convert_inedge(source_node, IR_node)
  
      kwargs = dict()
  
      source_node_layer = source_node.layer
      source_node_pad = source_node_layer.padding
  
      if source_node_pad.HasField("constant"):
          kwargs["mode"] = "CONSTANT"
      elif source_node_pad.HasField("reflection"):
          kwargs["mode"] = "REFLECT"
      elif source_node_pad.HasField("replication"):
          kwargs["mode"] = "SYMMETRIC"
      else:
          assert False
  
      dim = []
      for i in source_node_pad.paddingAmounts.borderAmounts:
          dim.extend([i.startEdgeSize, i.endEdgeSize])
  
      if dim == []:
          dim = [0, 0, 0, 0]
  
      # padding
      kwargs["pads"] = [0, 0]
  
      kwargs["pads"].extend(dim)
  
      kwargs["pads"] += [0, 0]
      kwargs["pads"] = convert_tf_pad_to_onnx(kwargs["pads"])
  
      assign_IRnode_values(IR_node, kwargs)
  
imports: import os
  from six import string_types
  import numpy
  import math
  from coremltools.models.neural_network import NeuralNetworkBuilder
  from coremltools.models import datatypes
  from coremltools.models import MLModel
  from coremltools.models.utils import save_spec
  from coremltools.models._infer_shapes_nn_mlmodel import infer_shapes
  from coremltools.proto import Model_pb2, NeuralNetwork_pb2
  from mmdnn.conversion.coreml.coreml_graph import CoremlGraph
  import mmdnn.conversion.common.IR.graph_pb2
  from mmdnn.conversion.common.IR.graph_pb2 import NodeDef, GraphDef, DataType
  from mmdnn.conversion.common.DataStructure.parser import Parser
  from mmdnn.conversion.common.utils import *
label_desc: Use image node_id 12 for calling the CoremlParser obj's underlying member method code with example usage: obj._convert_padding_api(source_node, IR_node) without return types