code: def emit_Pad(self, IR_node):
      input_name = self.IR_graph.get_parent(IR_node.name, [0]).real_name
      output_name = IR_node.real_name
      is_1d = False
      padding = IR_node.get_attr("pads")
      if is_1d:
          raise ValueError(
              "Unrecognized padding option: %s" % (str(padding))
          )
      else:
          if type(padding) is int:
              top = left = bottom = right = padding
          elif type(padding) is list:
              top, left = padding[1], padding[2]
              bottom, right = padding[5], padding[6]
          else:
              raise ValueError(
                  "Unrecognized padding option: %s" % (str(padding))
              )
  
      # padding type TODO
      # Type of the padding. Can be one of 'constant', 'reflection' or 'replication
      padding_type = IR_node.get_attr("mode", "CONSTANT")
      if padding_type == "CONSTANT":
          padding_type = "constant"
      elif padding_type == "REFLECT":
          padding_type = "reflection"
      elif padding_type == "SYMMETRIC":
          padding_type = "replication"
  
      # Now add the layer
      self.builder.add_padding(
          name=IR_node.name,
          left=left,
          right=right,
          top=top,
          bottom=bottom,
          value=0,
          input_name=input_name,
          output_name=output_name,
          padding_type=padding_type,
      )
  
imports: from __future__ import division
  import os
  import numpy
  from six import string_types
  from mmdnn.conversion.common.IR.IR_graph import IRGraph, IRGraphNode
  import mmdnn.conversion.common.IR.graph_pb2
  from mmdnn.conversion.common.IR.graph_pb2 import NodeDef, GraphDef, DataType
  from mmdnn.conversion.common.DataStructure.emitter import Emitter
  from mmdnn.conversion.common.utils import *
  from mmdnn.conversion.coreml.coreml_utils import _infer_coreml_input_shape
  from coremltools.models.neural_network import NeuralNetworkBuilder
  from coremltools.models import datatypes
  from coremltools.models import MLModel
  from coremltools.models.utils import save_spec
label_desc: Use image node_id 42 for calling the CoreMLEmitter obj's underlying member method code with example usage: obj.emit_Pad(IR_node) without return types