code: def emit_Reshape(self, IR_node):
      def ShapetrToTuple(string, batch_none=False):
          if batch_none == True:
              ls = [int(item) for item in string.split(", ")]
              ls.insert(0, None)
              return tuple(ls)
          else:
              ls = [int(item) for item in string.split(", ")]
              return tuple(ls)
  
      last_node = self.IR_graph.get_node(IR_node.in_edges[0]).layer
      input_shape_dims = last_node.attr["_output_shapes"].list.shape
      target_shape_dims = IR_node.IR_layer.attr[
          "_output_shapes"
      ].list.shape
  
      input_shape = ShapetrToTuple(
          IRGraph.shapeToStr(input_shape_dims[0]), True
      )
      target_shape = ShapetrToTuple(
          IRGraph.shapeToStr(target_shape_dims[0])
      )
  
      def get_coreml_target_shape(target_shape):
          if len(target_shape) == 1:  # (D,)
              coreml_shape = (1, target_shape[0], 1, 1)
          elif len(target_shape) == 2:  # (S,D)
              coreml_shape = target_shape + (1, 1)
          elif len(target_shape) == 3:  # (H,W,C)
              coreml_shape = (
                  1,
                  target_shape[2],
                  target_shape[0],
                  target_shape[1],
              )
          else:
              coreml_shape = None
          return coreml_shape
  
      def get_mode(input_shape, target_shape):
          in_shape = input_shape[1:]
          if len(in_shape) == 3 or len(target_shape) == 3:
              return 1
          else:
              return 0
  
      input_name = self.IR_graph.get_node(IR_node.in_edges[0]).real_name
      new_shape = get_coreml_target_shape(target_shape)
      mode = get_mode(input_shape, target_shape)
  
      self.builder.add_reshape(
          name=IR_node.real_name,
          input_name=input_name,
          output_name=IR_node.real_name,
          target_shape=new_shape,
          mode=mode,
      )
  
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 20 for calling the CoreMLEmitter obj's underlying member method code with example usage: obj.emit_Reshape(IR_node) and returns: coreml_shape, tuple, tuple, int, int