code: def __init__(self, mapping, replace=True):
      # A dictionary mapping NodeKind to the transposed order.
      self.mapping = mapping
      # The node kinds eligible for reshaping
      self.reshaped_node_types = self.mapping.keys()
      # If true, the reshaped data will replace the old one.
      # Otherwise, it's set to the reshaped_data attribute.
      self.replace = replace
  
imports: from __future__ import unicode_literals
  from google.protobuf import text_format
  import numpy
  from mmdnn.conversion.caffe.graph import GraphBuilder, NodeKind, LAYER_IN_TRAIN_PROTO
  from mmdnn.conversion.caffe.mapper import NodeMapper, get_handler_name
  from mmdnn.conversion.caffe.resolver import get_caffe_resolver, has_pycaffe
  from mmdnn.conversion.caffe.errors import print_stderr, ConversionError
  from mmdnn.conversion.caffe.common_graph import Graph
  from mmdnn.conversion.caffe.utils import get_lower_case, get_upper_case
label_desc: Use image node_id 1 to create a new DataReshaper object from inherited base classes: object with example: obj = DataReshaper(mapping, replace)