code: def reduction(self, IR_node, op, axes):
      # Convert NHWC (IR) to NCHW (Caffe): [0,1,2,3]->[0,3,1,2]
      if len(axes) == 1:
          assert axes[0] == 2
      elif len(axes) == 2:
          assert (axes[0] == 1) and (axes[1] == 2)
  
      self.add_body(
          1,
          "n.{:<15} = L.Reduction(n.{}, operation={} , axis={} ,ntop=1)".format(
              IR_node.variable_name,
              self.parent_variable_name(IR_node),
              op,
              len(axes),
          ),
      )
  
      if IR_node.get_attr("keepdims") == True:
          shape = IR_node.get_attr("_output_shapes")[0]
          shape = shape_to_list(shape)
          shape = [1] + [shape[-1]] + shape[1:-1]
          dim_str = "'dim': {}".format(shape)
          dim_str = "{'shape': { " + dim_str + "} }"
          self.add_body(
              1,
              "n.{:<15} = L.Reshape(n.{}, reshape_param={}) ".format(
                  IR_node.variable_name + "_reshape",
                  IR_node.real_variable_name,
                  dim_str,
              ),
          )
          IR_node.real_name = IR_node.real_name + "_reshape"
  
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 35 for calling the CaffeEmitter obj's underlying member method code with example usage: obj.reduction(IR_node, op, axes) without return types