code: def check_if_need_crop(self, IR_node):
      shape = IR_node.get_attr("_output_shapes")[0]
      shape = shape_to_list(shape)
      ir_ho = shape[1]
      ir_wo = shape[2]
      if ir_ho < 0 or ir_wo < 0:
          return
      if IR_node.type == "Pool" or IR_node.type == "Unpool":
          k_h = IR_node.get_attr("kernel_shape")[1]
          k_w = IR_node.get_attr("kernel_shape")[2]
      else:
          k_h = IR_node.get_attr("kernel_shape")[0]
          k_w = IR_node.get_attr("kernel_shape")[1]
  
      caffe_ho, caffe_wo = self.compute_output_shape(IR_node, k_h, k_w)
  
      # if asymmetric padding, set offset to 1
      pads = IR_node.get_attr("pads")
      offset = [
          0 if pads[1] == pads[5] else 1,
          0 if pads[2] == pads[6] else 1,
      ]
      if caffe_ho > ir_ho or caffe_wo > ir_wo:
          crop_layer_variable_name = IR_node.variable_name + "_crop"
          self.add_body(
              1,
              "n.{:<15} = L.Crop(n.{}, L.DummyData(shape=[dict(dim=[1, {}, {}, {}])], \
                  ntop=1), ntop=1, offset={})".format(
                  crop_layer_variable_name,
                  IR_node.variable_name,
                  shape[3],
                  ir_ho,
                  ir_wo,
                  offset,
              ),
          )
          # Change the layer name
          IR_node.real_name = IR_node.real_name + "_crop"
  
imports: from __future__ import division
  import os
  import sys
  import math
  import numpy
  import caffe
  from caffe import layers
  from caffe import params
  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 *
label_desc: Use image node_id 11 for calling the CaffeEmitter obj's underlying member method code with example usage: obj.check_if_need_crop(IR_node) without return types