code: def _convert_dataformat(source_node, target_node):
      if source_node.keras_layer.data_format == "channels_last":
          target_node.attr["data_format"].s = "NHWC"
      elif source_node.keras_layer.data_format == "channels_first":
          target_node.attr["data_format"].s = "NCHW"
      else:
          print(
              "Warning: [%s] don't have data format info."
              % (source_node.keras_layer.name)
          )
  
imports: from __future__ import absolute_import
  import os
  import gzip
  from six import string_types
  import paddle.v2
  import paddle.trainer_config_helpers.layers
  import numpy
  from mmdnn.conversion.paddle.paddle_graph import PaddleGraph
  import mmdnn.conversion.common.IR.graph_pb2
  from mmdnn.conversion.common.IR.graph_pb2 import NodeDef, GraphDef, DataType
  from mmdnn.conversion.common.DataStructure.parser import Parser
  from mmdnn.conversion.common.utils import *
label_desc: Use image node_id 8 for calling the PaddleParser obj's underlying member method code with example usage: obj._convert_dataformat(source_node, target_node) without return types